mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-24 18:45:52 +03:00
Mark as notified
This commit is contained in:
parent
e70d484e1c
commit
c59e904839
1 changed files with 2 additions and 0 deletions
|
@ -51,6 +51,7 @@ class _NotificationListener(object):
|
||||||
self.deferred = deferred
|
self.deferred = deferred
|
||||||
self.created = int(time.time() * 1000)
|
self.created = int(time.time() * 1000)
|
||||||
self.timeout = timeout
|
self.timeout = timeout
|
||||||
|
self.notified = False
|
||||||
|
|
||||||
def notified(self):
|
def notified(self):
|
||||||
return self.deferred.called
|
return self.deferred.called
|
||||||
|
@ -58,6 +59,7 @@ class _NotificationListener(object):
|
||||||
def notify(self, token):
|
def notify(self, token):
|
||||||
""" Inform whoever is listening about the new events.
|
""" Inform whoever is listening about the new events.
|
||||||
"""
|
"""
|
||||||
|
self.notified = True
|
||||||
try:
|
try:
|
||||||
self.deferred.callback(token)
|
self.deferred.callback(token)
|
||||||
except defer.AlreadyCalledError:
|
except defer.AlreadyCalledError:
|
||||||
|
|
Loading…
Reference in a new issue