mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-07-21 09:58:46 -04:00
Do not allow cross-room relations, per MSC2674. (#11516)
This commit is contained in:
parent
0cc3bf97b4
commit
3b8872299a
6 changed files with 161 additions and 17 deletions
|
@ -1780,10 +1780,14 @@ class PersistEventsStore:
|
|||
)
|
||||
|
||||
if rel_type == RelationTypes.REPLACE:
|
||||
txn.call_after(self.store.get_applicable_edit.invalidate, (parent_id,))
|
||||
txn.call_after(
|
||||
self.store.get_applicable_edit.invalidate, (parent_id, event.room_id)
|
||||
)
|
||||
|
||||
if rel_type == RelationTypes.THREAD:
|
||||
txn.call_after(self.store.get_thread_summary.invalidate, (parent_id,))
|
||||
txn.call_after(
|
||||
self.store.get_thread_summary.invalidate, (parent_id, event.room_id)
|
||||
)
|
||||
|
||||
def _handle_insertion_event(self, txn: LoggingTransaction, event: EventBase):
|
||||
"""Handles keeping track of insertion events and edges/connections.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue