diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2023-03-21 14:19:54 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-21 14:19:54 -0400 |
commit | 1bc4feb6c9762216e930daf0ddbdb86c77bf7724 (patch) | |
tree | dd8dc6a76fbadabf0814e7fbbe623b8e8c6a6c6d /synapse/storage/databases/main/relations.py | |
parent | Revert "check sqlite database file exists before porting/#14692" (#15301) (diff) | |
download | synapse-1bc4feb6c9762216e930daf0ddbdb86c77bf7724.tar.xz |
Apply & bundle edits for non-message events. (#15295)
Diffstat (limited to 'synapse/storage/databases/main/relations.py')
-rw-r--r-- | synapse/storage/databases/main/relations.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/synapse/storage/databases/main/relations.py b/synapse/storage/databases/main/relations.py index bc3a83919c..3955a8a9a5 100644 --- a/synapse/storage/databases/main/relations.py +++ b/synapse/storage/databases/main/relations.py @@ -472,12 +472,11 @@ class RelationsWorkerStore(SQLBaseStore): the event will map to None. """ - # We only allow edits for `m.room.message` events that have the same sender - # and event type. We can't assert these things during regular event auth so - # we have to do the checks post hoc. + # We only allow edits for events that have the same sender and event type. + # We can't assert these things during regular event auth so we have to do + # the checks post hoc. - # Fetches latest edit that has the same type and sender as the - # original, and is an `m.room.message`. + # Fetches latest edit that has the same type and sender as the original. if isinstance(self.database_engine, PostgresEngine): # The `DISTINCT ON` clause will pick the *first* row it encounters, # so ordering by origin server ts + event ID desc will ensure we get @@ -493,7 +492,6 @@ class RelationsWorkerStore(SQLBaseStore): WHERE %s AND relation_type = ? - AND edit.type = 'm.room.message' ORDER by original.event_id DESC, edit.origin_server_ts DESC, edit.event_id DESC """ else: @@ -512,7 +510,6 @@ class RelationsWorkerStore(SQLBaseStore): WHERE %s AND relation_type = ? - AND edit.type = 'm.room.message' ORDER by edit.origin_server_ts, edit.event_id """ |