mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-22 19:49:24 -05:00
When updating a stored event from outlier to non-outlier, remember to update the extremeties
This commit is contained in:
parent
2ff439cff7
commit
3b05b67c89
@ -303,6 +303,9 @@ class EventFederationStore(SQLBaseStore):
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self._update_extremeties(txn, events)
|
||||||
|
|
||||||
|
def _update_extremeties(self, txn, events):
|
||||||
events_by_room = {}
|
events_by_room = {}
|
||||||
for ev in events:
|
for ev in events:
|
||||||
events_by_room.setdefault(ev.room_id, []).append(ev)
|
events_by_room.setdefault(ev.room_id, []).append(ev)
|
||||||
|
@ -275,6 +275,8 @@ class EventsStore(SQLBaseStore):
|
|||||||
(False, event.event_id,)
|
(False, event.event_id,)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self._update_extremeties(txn, [event])
|
||||||
|
|
||||||
events_and_contexts = filter(
|
events_and_contexts = filter(
|
||||||
lambda ec: ec[0] not in to_remove,
|
lambda ec: ec[0] not in to_remove,
|
||||||
events_and_contexts
|
events_and_contexts
|
||||||
|
Loading…
Reference in New Issue
Block a user