Skip to content

Commit

Permalink
Revert "only update needed auth events"
Browse files Browse the repository at this point in the history
This reverts commit 59e3c1b.
  • Loading branch information
ggogel committed Feb 28, 2024
1 parent 23f3f01 commit c7ea377
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions synapse/event_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,23 +175,13 @@ async def check_state_independent_auth_rules(
return

# 2. Reject if event has auth_events that: ...
auth_events = await store.get_events(
event.auth_event_ids(),
redact_behaviour=EventRedactBehaviour.as_is,
allow_rejected=True,
)
if batched_auth_events:
auth_events = batched_auth_events
needed_auth_event_ids = set(event.auth_event_ids()) - set(batched_auth_events)
if needed_auth_event_ids:
auth_events.update(
await store.get_events(
needed_auth_event_ids,
redact_behaviour=EventRedactBehaviour.as_is,
allow_rejected=True,
)
)
else:
auth_events = await store.get_events(
event.auth_event_ids(),
redact_behaviour=EventRedactBehaviour.as_is,
allow_rejected=True
)
auth_events.update(batched_auth_events)

room_id = event.room_id
auth_dict: MutableStateMap[str] = {}
Expand Down

0 comments on commit c7ea377

Please sign in to comment.