mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-17 18:09:15 -04:00
Update the rejected state of events during resync (#13459)
Events can be un-rejected or newly-rejected during resync, so ensure we update the database and caches when that happens.
This commit is contained in:
parent
2281427175
commit
507c1cb330
4 changed files with 66 additions and 9 deletions
|
@ -430,6 +430,11 @@ class StateGroupWorkerStore(EventsWorkerStore, SQLBaseStore):
|
|||
updatevalues={"state_group": state_group},
|
||||
)
|
||||
|
||||
# the event may now be rejected where it was not before, or vice versa,
|
||||
# in which case we need to update the rejected flags.
|
||||
if bool(context.rejected) != (event.rejected_reason is not None):
|
||||
self.mark_event_rejected_txn(txn, event.event_id, context.rejected)
|
||||
|
||||
self.db_pool.simple_delete_one_txn(
|
||||
txn,
|
||||
table="partial_state_events",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue