diff options
author | Erik Johnston <erik@matrix.org> | 2016-02-10 11:25:32 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-02-10 11:25:32 +0000 |
commit | f7ef5c1d57617f4bd0d40251fdd3145a82a47742 (patch) | |
tree | 5e93b2013aa788f52ea61fd5271204c411f9abfa /synapse/handlers/federation.py | |
parent | Merge pull request #532 from floviolleau/floviolleau/documentation (diff) | |
parent | Rename functions (diff) | |
download | synapse-f7ef5c1d57617f4bd0d40251fdd3145a82a47742.tar.xz |
Merge pull request #568 from matrix-org/erikj/unread_notif
Atomically persit push actions when we persist the event
Diffstat (limited to 'synapse/handlers/federation.py')
-rw-r--r-- | synapse/handlers/federation.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index b78b0502d9..da55d43541 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -236,12 +236,6 @@ 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.hs) - yield action_generator.handle_push_actions_for_event( - event, self - ) - @defer.inlineCallbacks def _filter_events_for_server(self, server_name, room_id, events): event_to_state = yield self.store.get_state_for_events( @@ -1073,6 +1067,12 @@ class FederationHandler(BaseHandler): auth_events=auth_events, ) + if not backfilled and not event.internal_metadata.is_outlier(): + action_generator = ActionGenerator(self.hs) + yield action_generator.handle_push_actions_for_event( + event, context, self + ) + event_stream_id, max_stream_id = yield self.store.persist_event( event, context=context, |