From 83f031207e3ff1ceaacccaf83df76ea67aeefb1b Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Mon, 18 Aug 2014 16:43:18 +0100 Subject: Implement and test presence dropping of remote users --- synapse/handlers/presence.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'synapse') diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py index e8cb83eddb..73ec45c9cb 100644 --- a/synapse/handlers/presence.py +++ b/synapse/handlers/presence.py @@ -463,9 +463,13 @@ class PresenceHandler(BaseHandler): deferreds = [] if target_user: - raise NotImplementedError("TODO: remove one user") + if target_user not in self._remote_recvmap: + return + target_users = set([target_user]) + else: + target_users = self._remote_recvmap.keys() - remoteusers = [u for u in self._remote_recvmap + remoteusers = [u for u in target_users if user in self._remote_recvmap[u]] remoteusers_by_domain = partition(remoteusers, lambda u: u.domain) -- cgit 1.4.1