summary refs log tree commit diff
path: root/synapse/notifier.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-08-27 15:33:52 +0100
committerErik Johnston <erik@matrix.org>2014-08-27 15:33:52 +0100
commitbfe9faad5abf429b7023aaaeb3ba3200a75bf485 (patch)
tree42e4db7e5cb31fa888294c619badec80e3a73cb9 /synapse/notifier.py
parentConvert get_paginat_rows to use PaginationConfig. This allows people to suppl... (diff)
downloadsynapse-bfe9faad5abf429b7023aaaeb3ba3200a75bf485.tar.xz
Index sources in a nicer fashion.
Diffstat (limited to 'synapse/notifier.py')
-rw-r--r--synapse/notifier.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/notifier.py b/synapse/notifier.py
index a69d5343cb..b969011b32 100644
--- a/synapse/notifier.py
+++ b/synapse/notifier.py
@@ -69,7 +69,7 @@ class Notifier(object):
     def on_new_room_event(self, event, extra_users=[]):
         room_id = event.room_id
 
-        source = self.event_sources.sources[0]
+        source = self.event_sources.sources["room"]
 
         listeners = self.rooms_to_listeners.get(room_id, set()).copy()
 
@@ -94,7 +94,7 @@ class Notifier(object):
 
     @defer.inlineCallbacks
     def on_new_user_event(self, users=[], rooms=[]):
-        source = self.event_sources.sources[1]
+        source = self.event_sources.sources["presence"]
 
         listeners = set()
 
@@ -176,7 +176,7 @@ class Notifier(object):
         limit = listener.limit
 
         # TODO (erikj): DeferredList?
-        for source in self.event_sources.sources:
+        for source in self.event_sources.sources.values():
             stuff, new_token = yield source.get_new_events_for_user(
                 listener.user,
                 from_token,