diff options
author | Erik Johnston <erikj@jki.re> | 2016-11-23 15:39:12 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-23 15:39:12 +0000 |
commit | 302fbd218ddb00a1d38e778b29cdf043800941e1 (patch) | |
tree | 89e462d2fc8d2470bb66d744e2289050df7edef3 /synapse/notifier.py | |
parent | Merge pull request #1641 from matrix-org/erikj/as_pushers (diff) | |
parent | Shuffle receipt handler around so that worker apps don't need to load it (diff) | |
download | synapse-302fbd218ddb00a1d38e778b29cdf043800941e1.tar.xz |
Merge pull request #1635 from matrix-org/erikj/split_out_fed_txn
Split out federation transaction sending to a worker
Diffstat (limited to 'synapse/notifier.py')
-rw-r--r-- | synapse/notifier.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/synapse/notifier.py b/synapse/notifier.py index 48653ae843..054ca59ad2 100644 --- a/synapse/notifier.py +++ b/synapse/notifier.py @@ -143,6 +143,12 @@ class Notifier(object): self.clock = hs.get_clock() self.appservice_handler = hs.get_application_service_handler() + + if hs.should_send_federation(): + self.federation_sender = hs.get_federation_sender() + else: + self.federation_sender = None + self.state_handler = hs.get_state_handler() self.clock.looping_call( @@ -220,6 +226,9 @@ class Notifier(object): # poke any interested application service. self.appservice_handler.notify_interested_services(room_stream_id) + if self.federation_sender: + self.federation_sender.notify_new_events(room_stream_id) + if event.type == EventTypes.Member and event.membership == Membership.JOIN: self._user_joined_room(event.state_key, event.room_id) |