summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2022-04-14 13:05:31 +0100
committerGitHub <noreply@github.com>2022-04-14 13:05:31 +0100
commit0b014eb25e8c0766d2552fae2ba366492dc16d4d (patch)
tree7bbad81d50705f6e87205feb0d412e1354dc1843 /synapse/handlers
parentReintroduce the lint targets in the linter script (#12455) (diff)
downloadsynapse-0b014eb25e8c0766d2552fae2ba366492dc16d4d.tar.xz
Only send out device list updates for our own users (#12465)
Broke in #12365
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/device.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/synapse/handlers/device.py b/synapse/handlers/device.py
index 958599e7b8..3c0fc756d4 100644
--- a/synapse/handlers/device.py
+++ b/synapse/handlers/device.py
@@ -649,9 +649,13 @@ class DeviceHandler(DeviceWorkerHandler):
                         return
 
                 for user_id, device_id, room_id, stream_id, opentracing_context in rows:
-                    joined_user_ids = await self.store.get_users_in_room(room_id)
-                    hosts = {get_domain_from_id(u) for u in joined_user_ids}
-                    hosts.discard(self.server_name)
+                    hosts = set()
+
+                    # Ignore any users that aren't ours
+                    if self.hs.is_mine_id(user_id):
+                        joined_user_ids = await self.store.get_users_in_room(room_id)
+                        hosts = {get_domain_from_id(u) for u in joined_user_ids}
+                        hosts.discard(self.server_name)
 
                     # Check if we've already sent this update to some hosts
                     if current_stream_id == stream_id: