diff options
author | Mark Haines <mjark@negativecurvature.net> | 2016-05-31 14:31:19 +0100 |
---|---|---|
committer | Mark Haines <mjark@negativecurvature.net> | 2016-05-31 14:31:19 +0100 |
commit | 014e0799f90b67e29fa7d1fcb7938e0a0c6b8617 (patch) | |
tree | e72ab5618420cd31c55493ed56f3e781c6eb1078 /synapse/notifier.py | |
parent | Merge pull request #802 from matrix-org/dbkr/split_room_list_handler (diff) | |
parent | Move the AS handler out of the Handlers object. (diff) | |
download | synapse-014e0799f90b67e29fa7d1fcb7938e0a0c6b8617.tar.xz |
Merge pull request #803 from matrix-org/markjh/liberate_appservice_handler
Move the AS handler out of the Handlers object.
Diffstat (limited to 'synapse/notifier.py')
-rw-r--r-- | synapse/notifier.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/synapse/notifier.py b/synapse/notifier.py index 33b79c0ec7..cbec4d30ae 100644 --- a/synapse/notifier.py +++ b/synapse/notifier.py @@ -140,8 +140,6 @@ class Notifier(object): UNUSED_STREAM_EXPIRY_MS = 10 * 60 * 1000 def __init__(self, hs): - self.hs = hs - self.user_to_user_stream = {} self.room_to_user_streams = {} self.appservice_to_user_streams = {} @@ -151,6 +149,8 @@ class Notifier(object): self.pending_new_room_events = [] self.clock = hs.get_clock() + self.appservice_handler = hs.get_application_service_handler() + self.state_handler = hs.get_state_handler() hs.get_distributor().observe( "user_joined_room", self._user_joined_room @@ -232,9 +232,7 @@ class Notifier(object): def _on_new_room_event(self, event, room_stream_id, extra_users=[]): """Notify any user streams that are interested in this room event""" # poke any interested application service. - self.hs.get_handlers().appservice_handler.notify_interested_services( - event - ) + self.appservice_handler.notify_interested_services(event) app_streams = set() @@ -449,7 +447,7 @@ class Notifier(object): @defer.inlineCallbacks def _is_world_readable(self, room_id): - state = yield self.hs.get_state_handler().get_current_state( + state = yield self.state_handler.get_current_state( room_id, EventTypes.RoomHistoryVisibility ) |