diff options
author | Erik Johnston <erikj@jki.re> | 2018-04-25 17:54:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-25 17:54:12 +0100 |
commit | a5ad88913c55ac5e42b38d9a40c5c25a7280510d (patch) | |
tree | 8e2a21e7c8bac1cdd67fdbe8abc09e3e85315535 /synapse/storage | |
parent | Merge branch 'master' into develop (diff) | |
parent | Also fix reindexing of search (diff) | |
download | synapse-a5ad88913c55ac5e42b38d9a40c5c25a7280510d.tar.xz |
Merge pull request #3130 from matrix-org/erikj/fix_quarantine_room
Fix quarantine media admin API
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/room.py | 2 | ||||
-rw-r--r-- | synapse/storage/search.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/room.py b/synapse/storage/room.py index 740c036975..c0c01bcfbe 100644 --- a/synapse/storage/room.py +++ b/synapse/storage/room.py @@ -595,7 +595,7 @@ class RoomStore(RoomWorkerStore, SearchStore): while next_token: sql = """ SELECT stream_ordering, json FROM events - JOIN event_json USING (event_id) + JOIN event_json USING (room_id, event_id) WHERE room_id = ? AND stream_ordering < ? AND contains_url = ? AND outlier = ? diff --git a/synapse/storage/search.py b/synapse/storage/search.py index 426cbe6e1a..6ba3e59889 100644 --- a/synapse/storage/search.py +++ b/synapse/storage/search.py @@ -77,7 +77,7 @@ class SearchStore(BackgroundUpdateStore): sql = ( "SELECT stream_ordering, event_id, room_id, type, json, " " origin_server_ts FROM events" - " JOIN event_json USING (event_id)" + " JOIN event_json USING (room_id, event_id)" " WHERE ? <= stream_ordering AND stream_ordering < ?" " AND (%s)" " ORDER BY stream_ordering DESC" |