summary refs log tree commit diff
path: root/synapse/handlers/device.py
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2020-03-27 12:39:54 +0000
committerDavid Baker <dave@matrix.org>2020-03-27 12:39:54 +0000
commit16ee97988abb1951e7009620f69904f9bb7c9215 (patch)
tree9ea27285e0e7b0b97160d31084f7421c9460195d /synapse/handlers/device.py
parentblack (diff)
downloadsynapse-16ee97988abb1951e7009620f69904f9bb7c9215.tar.xz
Fix undefined variable & remove debug logging
Diffstat (limited to 'synapse/handlers/device.py')
-rw-r--r--synapse/handlers/device.py12
1 files changed, 2 insertions, 10 deletions
diff --git a/synapse/handlers/device.py b/synapse/handlers/device.py
index 80e7374c6a..07ce553995 100644
--- a/synapse/handlers/device.py
+++ b/synapse/handlers/device.py
@@ -126,18 +126,10 @@ class DeviceWorkerHandler(BaseHandler):
         # always tell the user about their own devices
         tracked_users.add(user_id)
 
-        logger.info(
-            "tracked users ids: %r", tracked_users,
-        )
-
         changed = yield self.store.get_users_whose_devices_changed(
             from_token.device_list_key, tracked_users
         )
 
-        logger.info(
-            "changed users IDs: %r", changed,
-        )
-
         # Then work out if any users have since joined
         rooms_changed = self.store.get_rooms_that_changed(room_ids, from_token.room_key)
 
@@ -225,8 +217,8 @@ class DeviceWorkerHandler(BaseHandler):
         if possibly_changed or possibly_left:
             # Take the intersection of the users whose devices may have changed
             # and those that actually still share a room with the user
-            possibly_joined = possibly_changed & users_who_share_room
-            possibly_left = (possibly_changed | possibly_left) - users_who_share_room
+            possibly_joined = possibly_changed & tracked_users
+            possibly_left = (possibly_changed | possibly_left) - tracked_users
         else:
             possibly_joined = []
             possibly_left = []