mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-19 07:07:54 -04:00
Factor out a separate EventContext.for_outlier
(#10883)
Constructing an EventContext for an outlier is actually really simple, and there's no sense in going via an `async` method in the `StateHandler`. This also means that we can resolve a bunch of FIXMEs.
This commit is contained in:
parent
f78b68a96b
commit
26f2bfedbf
5 changed files with 21 additions and 44 deletions
|
@ -1221,7 +1221,7 @@ class FederationEventHandler:
|
|||
async def prep(ev_info: _NewEventInfo) -> EventContext:
|
||||
event = ev_info.event
|
||||
with nested_logging_context(suffix=event.event_id):
|
||||
res = await self._state_handler.compute_event_context(event)
|
||||
res = EventContext.for_outlier()
|
||||
res = await self._check_event_auth(
|
||||
origin,
|
||||
event,
|
||||
|
@ -1540,10 +1540,7 @@ class FederationEventHandler:
|
|||
event.event_id,
|
||||
auth_event.event_id,
|
||||
)
|
||||
missing_auth_event_context = (
|
||||
await self._state_handler.compute_event_context(auth_event)
|
||||
)
|
||||
|
||||
missing_auth_event_context = EventContext.for_outlier()
|
||||
missing_auth_event_context = await self._check_event_auth(
|
||||
origin,
|
||||
auth_event,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue