mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-20 02:44:19 -05:00
Revert behavior change for bundling edits of non-message events (#14283)
This commit is contained in:
parent
1e73effebf
commit
581b37b5d6
1
changelog.d/14283.bugfix
Normal file
1
changelog.d/14283.bugfix
Normal file
@ -0,0 +1 @@
|
|||||||
|
Fix a bug introduced in Synapse 1.70.0rc1 where edits to non-message events were aggregated by the homeserver.
|
@ -484,11 +484,12 @@ class RelationsWorkerStore(SQLBaseStore):
|
|||||||
the event will map to None.
|
the event will map to None.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# We only allow edits for events that have the same sender and event type.
|
# We only allow edits for `m.room.message` events that have the same sender
|
||||||
# We can't assert these things during regular event auth so we have to do
|
# and event type. We can't assert these things during regular event auth so
|
||||||
# the checks post hoc.
|
# we have to do the checks post hoc.
|
||||||
|
|
||||||
# Fetches latest edit that has the same type and sender as the original.
|
# Fetches latest edit that has the same type and sender as the
|
||||||
|
# original, and is an `m.room.message`.
|
||||||
if isinstance(self.database_engine, PostgresEngine):
|
if isinstance(self.database_engine, PostgresEngine):
|
||||||
# The `DISTINCT ON` clause will pick the *first* row it encounters,
|
# The `DISTINCT ON` clause will pick the *first* row it encounters,
|
||||||
# so ordering by origin server ts + event ID desc will ensure we get
|
# so ordering by origin server ts + event ID desc will ensure we get
|
||||||
@ -504,6 +505,7 @@ class RelationsWorkerStore(SQLBaseStore):
|
|||||||
WHERE
|
WHERE
|
||||||
%s
|
%s
|
||||||
AND relation_type = ?
|
AND relation_type = ?
|
||||||
|
AND edit.type = 'm.room.message'
|
||||||
ORDER by original.event_id DESC, edit.origin_server_ts DESC, edit.event_id DESC
|
ORDER by original.event_id DESC, edit.origin_server_ts DESC, edit.event_id DESC
|
||||||
"""
|
"""
|
||||||
else:
|
else:
|
||||||
@ -522,6 +524,7 @@ class RelationsWorkerStore(SQLBaseStore):
|
|||||||
WHERE
|
WHERE
|
||||||
%s
|
%s
|
||||||
AND relation_type = ?
|
AND relation_type = ?
|
||||||
|
AND edit.type = 'm.room.message'
|
||||||
ORDER by edit.origin_server_ts, edit.event_id
|
ORDER by edit.origin_server_ts, edit.event_id
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user