Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 8c68d80

Browse files
author
Sean Quah
committed
Don't add previously rejected events to state during state res
Signed-off-by: Sean Quah <seanq@matrix.org>
1 parent 751ade9 commit 8c68d80

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

synapse/state/v2.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -577,15 +577,16 @@ async def _iterative_auth_checks(
577577
if ev.rejected_reason is None:
578578
auth_events[key] = event_map[ev_id]
579579

580-
try:
581-
event_auth.check_state_dependent_auth_rules(
582-
event,
583-
auth_events.values(),
584-
)
580+
if event.rejected_reason is None:
581+
try:
582+
event_auth.check_state_dependent_auth_rules(
583+
event,
584+
auth_events.values(),
585+
)
585586

586-
resolved_state[(event.type, event.state_key)] = event_id
587-
except AuthError:
588-
pass
587+
resolved_state[(event.type, event.state_key)] = event_id
588+
except AuthError:
589+
pass
589590

590591
# We await occasionally when we're working with large data sets to
591592
# ensure that we don't block the reactor loop for too long.

0 commit comments

Comments
 (0)