summary refs log tree commit diff
path: root/synapse/handlers/device.py
diff options
context:
space:
mode:
authorNick Mills-Barrett <nick@beeper.com>2022-09-29 14:55:12 +0100
committerGitHub <noreply@github.com>2022-09-29 13:55:12 +0000
commita466164647b969efd2e85168144cd75693443c05 (patch)
treef69547590e89cecc7788fb06d770d15a5bba37a3 /synapse/handlers/device.py
parentAllow admins to require a manual approval process before new accounts can be ... (diff)
downloadsynapse-a466164647b969efd2e85168144cd75693443c05.tar.xz
Optimise get_rooms_for_user (drop with_stream_ordering) (#13787)
Diffstat (limited to 'synapse/handlers/device.py')
-rw-r--r--synapse/handlers/device.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/synapse/handlers/device.py b/synapse/handlers/device.py
index 03082fce42..f9cc5bddbc 100644
--- a/synapse/handlers/device.py
+++ b/synapse/handlers/device.py
@@ -273,11 +273,9 @@ class DeviceWorkerHandler:
             possibly_left = possibly_changed | possibly_left
 
             # Double check if we still share rooms with the given user.
-            users_rooms = await self.store.get_rooms_for_users_with_stream_ordering(
-                possibly_left
-            )
+            users_rooms = await self.store.get_rooms_for_users(possibly_left)
             for changed_user_id, entries in users_rooms.items():
-                if any(e.room_id in room_ids for e in entries):
+                if any(rid in room_ids for rid in entries):
                     possibly_left.discard(changed_user_id)
                 else:
                     possibly_joined.discard(changed_user_id)