diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-05-14 14:59:31 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-05-14 14:59:31 +0100 |
commit | c5d1b4986bbb5983054b64fdc3dd3c32e80e3c17 (patch) | |
tree | 7700f6e2992cdb0766ebbc10e859cedc5611b5e5 /synapse | |
parent | Treat setting your display name to the empty string as removing it (SYN-186). (diff) | |
download | synapse-c5d1b4986bbb5983054b64fdc3dd3c32e80e3c17.tar.xz |
Remove unused arguments and doc PresenceHandler.push_update_to_clients
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/handlers/presence.py | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py index 1edab05492..0c246958ac 100644 --- a/synapse/handlers/presence.py +++ b/synapse/handlers/presence.py @@ -496,9 +496,7 @@ class PresenceHandler(BaseHandler): # We want to tell the person that just came online # presence state of people they are interested in? self.push_update_to_clients( - observed_user=target_user, users_to_push=[user], - statuscache=self._get_or_offline_usercache(target_user), ) deferreds = [] @@ -712,10 +710,7 @@ class PresenceHandler(BaseHandler): continue self.push_update_to_clients( - observed_user=user, - users_to_push=observers, - room_ids=room_ids, - statuscache=statuscache, + users_to_push=observers, room_ids=room_ids ) user_id = user.to_string() @@ -779,10 +774,7 @@ class PresenceHandler(BaseHandler): localusers = set(localusers) self.push_update_to_clients( - observed_user=observed_user, - users_to_push=localusers, - room_ids=room_ids, - statuscache=statuscache, + users_to_push=localusers, room_ids=room_ids ) remote_domains = set(remote_domains) @@ -807,8 +799,12 @@ class PresenceHandler(BaseHandler): defer.returnValue((localusers, remote_domains)) - def push_update_to_clients(self, observed_user, users_to_push=[], - room_ids=[], statuscache=None): + def push_update_to_clients(self, users_to_push=[], room_ids=[]): + """Notify clients of a new presence event. + Args: + users_to_push(list): List of users to notify. + room_ids(list): List of room_ids to notify. + """ with PreserveLoggingContext(): self.notifier.on_new_user_event( users_to_push, |