summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-05-20 14:48:11 +0100
committerMark Haines <mark.haines@matrix.org>2015-05-20 14:48:11 +0100
commit7ae8afb7ef5a0fb3162339737682e9248980600d (patch)
tree0fa2e981a4b37a02969f81296faae74bf17934b6 /synapse/handlers
parentFix the presence tests (diff)
downloadsynapse-7ae8afb7ef5a0fb3162339737682e9248980600d.tar.xz
Removed unused 'is_visible' method
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/presence.py27
1 files changed, 0 insertions, 27 deletions
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py
index 226d6a0f51..6c48b1d20e 100644
--- a/synapse/handlers/presence.py
+++ b/synapse/handlers/presence.py
@@ -1046,32 +1046,6 @@ class PresenceEventSource(object):
         self.clock = hs.get_clock()
 
     @defer.inlineCallbacks
-    def is_visible(self, observer_user, observed_user):
-        if observer_user == observed_user:
-            defer.returnValue(True)
-
-        presence = self.hs.get_handlers().presence_handler
-
-        if (yield presence.store.user_rooms_intersect(
-                [u.to_string() for u in observer_user, observed_user])):
-            defer.returnValue(True)
-
-        if self.hs.is_mine(observed_user):
-            pushmap = presence._local_pushmap
-
-            defer.returnValue(
-                observed_user.localpart in pushmap and
-                observer_user in pushmap[observed_user.localpart]
-            )
-        else:
-            recvmap = presence._remote_recvmap
-
-            defer.returnValue(
-                observed_user in recvmap and
-                observer_user in recvmap[observed_user]
-            )
-
-    @defer.inlineCallbacks
     @log_function
     def get_new_events_for_user(self, user, from_key, limit):
         from_key = int(from_key)
@@ -1099,7 +1073,6 @@ class PresenceEventSource(object):
                 user_ids_to_check |= set(joined)
 
         updates = []
-        # TODO(paul): use a DeferredList ? How to limit concurrency.
         for observed_user in user_ids_to_check & set(cachemap):
             cached = cachemap[observed_user]