summary refs log tree commit diff
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-05-14 12:03:26 +0100
committerMark Haines <mark.haines@matrix.org>2015-05-14 12:03:26 +0100
commit084c365c3ad7f3a30ecfccca6cc79fb2e0c652ad (patch)
treecdf92905a6259ce899945d367b0e757e77fd0045
parentMerge branch 'notifier_unify' into notifier_performance (diff)
downloadsynapse-084c365c3ad7f3a30ecfccca6cc79fb2e0c652ad.tar.xz
Use the current token when timing out a notifier, make sure the user_id is a string in on_new_user_event
-rw-r--r--synapse/notifier.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/notifier.py b/synapse/notifier.py
index 2de7dca8a5..3dbd6f984d 100644
--- a/synapse/notifier.py
+++ b/synapse/notifier.py
@@ -252,7 +252,7 @@ class Notifier(object):
         user_streams = set()
 
         for user in users:
-            user_stream = self.user_to_user_stream.get(user)
+            user_stream = self.user_to_user_stream.get(str(user))
             if user_stream is not None:
                 user_streams.add(user_stream)
 
@@ -317,7 +317,7 @@ class Notifier(object):
                 timed_out[0] = True
                 timer[0] = None
                 user_stream.listeners.discard(listener[0])
-                listener[0].notify(from_token)
+                listener[0].notify(current_token)
 
             # We create multiple notification listeners so we have to manage
             # canceling the timeout ourselves.