Use the current token when timing out a notifier, make sure the user_id is a string in on_new_user_event
parent
899d4675dd
commit
084c365c3a
|
@ -252,7 +252,7 @@ class Notifier(object):
|
||||||
user_streams = set()
|
user_streams = set()
|
||||||
|
|
||||||
for user in users:
|
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:
|
if user_stream is not None:
|
||||||
user_streams.add(user_stream)
|
user_streams.add(user_stream)
|
||||||
|
|
||||||
|
@ -317,7 +317,7 @@ class Notifier(object):
|
||||||
timed_out[0] = True
|
timed_out[0] = True
|
||||||
timer[0] = None
|
timer[0] = None
|
||||||
user_stream.listeners.discard(listener[0])
|
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
|
# We create multiple notification listeners so we have to manage
|
||||||
# canceling the timeout ourselves.
|
# canceling the timeout ourselves.
|
||||||
|
|
Loading…
Reference in New Issue