mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-08-03 16:04:12 -04:00
Remove uses of events.content
This commit is contained in:
parent
88cc9cc69e
commit
2fe3f848b9
3 changed files with 12 additions and 7 deletions
|
@ -75,8 +75,9 @@ class SearchStore(BackgroundUpdateStore):
|
|||
|
||||
def reindex_search_txn(txn):
|
||||
sql = (
|
||||
"SELECT stream_ordering, event_id, room_id, type, content, "
|
||||
"SELECT stream_ordering, event_id, room_id, type, json, "
|
||||
" origin_server_ts FROM events"
|
||||
" JOIN event_json USING (event_id)"
|
||||
" WHERE ? <= stream_ordering AND stream_ordering < ?"
|
||||
" AND (%s)"
|
||||
" ORDER BY stream_ordering DESC"
|
||||
|
@ -104,7 +105,8 @@ class SearchStore(BackgroundUpdateStore):
|
|||
stream_ordering = row["stream_ordering"]
|
||||
origin_server_ts = row["origin_server_ts"]
|
||||
try:
|
||||
content = json.loads(row["content"])
|
||||
event_json = json.loads(row["json"])
|
||||
content = event_json["content"]
|
||||
except Exception:
|
||||
continue
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue