summary refs log tree commit diff
path: root/synapse/handlers/presence.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-08-19 14:48:19 +0100
committerErik Johnston <erik@matrix.org>2014-08-19 14:48:19 +0100
commit347242a5c408d4ceb1880f6b90c8e9c658226dde (patch)
tree12a25b72d8f13a48f99441c249c3c531c79fff66 /synapse/handlers/presence.py
parentFix bug where we sometimes set min_token to None. (diff)
parentProofing (diff)
downloadsynapse-347242a5c408d4ceb1880f6b90c8e9c658226dde.tar.xz
Merge branch 'master' of github.com:matrix-org/synapse into sql_refactor
Conflicts:
	tests/rest/test_presence.py
	tests/rest/test_rooms.py
	tests/utils.py
Diffstat (limited to 'synapse/handlers/presence.py')
-rw-r--r--synapse/handlers/presence.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py
index f140dc527a..60684f17d7 100644
--- a/synapse/handlers/presence.py
+++ b/synapse/handlers/presence.py
@@ -383,7 +383,7 @@ class PresenceHandler(BaseHandler):
         logger.debug("Start polling for presence from %s", user)
 
         if target_user:
-            target_users = set(target_user)
+            target_users = set([target_user])
         else:
             presence = yield self.store.get_presence_list(
                 user.localpart, accepted=True
@@ -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)