mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 16:04:50 -04:00
Enable presence again. Fix up api to match old api.
This commit is contained in:
parent
c1cf0b334e
commit
67c5f89244
5 changed files with 35 additions and 10 deletions
|
@ -91,7 +91,25 @@ class Notifier(object):
|
|||
)
|
||||
|
||||
def on_new_user_event(self, *args, **kwargs):
|
||||
pass
|
||||
source = self.event_sources.sources[1]
|
||||
|
||||
listeners = self.signal_keys_to_users.get(
|
||||
(source.SIGNAL_NAME, "moose"),
|
||||
[]
|
||||
)
|
||||
|
||||
for listener in listeners:
|
||||
events, end_token = yield source.get_new_events_for_user(
|
||||
listener.user,
|
||||
listener.from_token,
|
||||
listener.limit,
|
||||
key="moose",
|
||||
)
|
||||
|
||||
if events:
|
||||
listener.notify(
|
||||
self, events, listener.from_token, end_token
|
||||
)
|
||||
|
||||
def get_events_for(self, user, pagination_config, timeout):
|
||||
deferred = defer.Deferred()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue