mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Having consulted The Erikle, this should go at the end of on_receive_pdu, otherwise it will be triggered whenever we backfill too.
This commit is contained in:
parent
21f135ba76
commit
a84a693327
@ -244,6 +244,12 @@ class FederationHandler(BaseHandler):
|
|||||||
user = UserID.from_string(event.state_key)
|
user = UserID.from_string(event.state_key)
|
||||||
yield user_joined_room(self.distributor, user, event.room_id)
|
yield user_joined_room(self.distributor, user, event.room_id)
|
||||||
|
|
||||||
|
if not backfilled and not event.internal_metadata.is_outlier():
|
||||||
|
action_generator = ActionGenerator(self.store)
|
||||||
|
yield action_generator.handle_event(serialize_event(
|
||||||
|
event, self.clock.time_msec())
|
||||||
|
)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def _filter_events_for_server(self, server_name, room_id, events):
|
def _filter_events_for_server(self, server_name, room_id, events):
|
||||||
event_to_state = yield self.store.get_state_for_events(
|
event_to_state = yield self.store.get_state_for_events(
|
||||||
@ -1115,11 +1121,6 @@ class FederationHandler(BaseHandler):
|
|||||||
current_state=current_state,
|
current_state=current_state,
|
||||||
)
|
)
|
||||||
|
|
||||||
action_generator = ActionGenerator(self.store)
|
|
||||||
yield action_generator.handle_event(serialize_event(
|
|
||||||
event, self.clock.time_msec())
|
|
||||||
)
|
|
||||||
|
|
||||||
defer.returnValue((context, event_stream_id, max_stream_id))
|
defer.returnValue((context, event_stream_id, max_stream_id))
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
@ -1146,12 +1147,6 @@ class FederationHandler(BaseHandler):
|
|||||||
is_new_state=(not outliers and not backfilled),
|
is_new_state=(not outliers and not backfilled),
|
||||||
)
|
)
|
||||||
|
|
||||||
for ev_info in event_infos:
|
|
||||||
action_generator = ActionGenerator(self.store)
|
|
||||||
yield action_generator.handle_event(serialize_event(
|
|
||||||
ev_info["event"], self.clock.time_msec())
|
|
||||||
)
|
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def _persist_auth_tree(self, auth_events, state, event):
|
def _persist_auth_tree(self, auth_events, state, event):
|
||||||
"""Checks the auth chain is valid (and passes auth checks) for the
|
"""Checks the auth chain is valid (and passes auth checks) for the
|
||||||
|
Loading…
Reference in New Issue
Block a user