mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-09 01:02:10 -04:00
Optimise get_rooms_for_user (drop with_stream_ordering) (#13787)
This commit is contained in:
parent
be76cd8200
commit
a466164647
7 changed files with 66 additions and 75 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue