0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-11-20 12:24:59 +01: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:
David Baker 2015-12-10 17:18:46 +00:00
parent 21f135ba76
commit a84a693327

View file

@ -244,6 +244,12 @@ class FederationHandler(BaseHandler):
user = UserID.from_string(event.state_key)
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
def _filter_events_for_server(self, server_name, room_id, events):
event_to_state = yield self.store.get_state_for_events(
@ -1115,11 +1121,6 @@ class FederationHandler(BaseHandler):
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.inlineCallbacks
@ -1146,12 +1147,6 @@ class FederationHandler(BaseHandler):
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
def _persist_auth_tree(self, auth_events, state, event):
"""Checks the auth chain is valid (and passes auth checks) for the