mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
Also perform paranoia checks in 'on_new_user_event'
This commit is contained in:
parent
65f5e4e3e4
commit
830d07db82
@ -252,10 +252,24 @@ class Notifier(object):
|
|||||||
listeners = set()
|
listeners = set()
|
||||||
|
|
||||||
for user in users:
|
for user in users:
|
||||||
listeners |= self.user_to_listeners.get(user, set()).copy()
|
user_listeners = self.user_to_listeners.get(user, set())
|
||||||
|
|
||||||
|
# Remove any 'stale' listeners.
|
||||||
|
for l in user_listeners.copy():
|
||||||
|
if l.notified():
|
||||||
|
user_listeners.discard(l)
|
||||||
|
|
||||||
|
listeners |= user_listeners
|
||||||
|
|
||||||
for room in rooms:
|
for room in rooms:
|
||||||
listeners |= self.room_to_listeners.get(room, set()).copy()
|
room_listeners = self.room_to_listeners.get(room, set())
|
||||||
|
|
||||||
|
# Remove any 'stale' listeners.
|
||||||
|
for l in room_listeners.copy():
|
||||||
|
if l.notified():
|
||||||
|
room_listeners.discard(l)
|
||||||
|
|
||||||
|
listeners |= room_listeners
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def notify(listener):
|
def notify(listener):
|
||||||
|
Loading…
Reference in New Issue
Block a user