mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:56:06 -04:00
Just add own user ID to the list we track device changes for
This commit is contained in:
parent
16ee97988a
commit
9fc588e6dc
2 changed files with 11 additions and 7 deletions
|
@ -1139,14 +1139,16 @@ class SyncHandler(object):
|
|||
# room with by looking at all users that have left a room plus users
|
||||
# that were in a room we've left.
|
||||
|
||||
users_we_track = await self.store.get_users_who_share_room_with_user(
|
||||
users_who_share_room = await self.store.get_users_who_share_room_with_user(
|
||||
user_id
|
||||
)
|
||||
users_we_track.add(user_id)
|
||||
|
||||
tracked_users = set(users_who_share_room)
|
||||
tracked_users.add(user_id)
|
||||
|
||||
# Step 1a, check for changes in devices of users we share a room with
|
||||
users_that_have_changed = await self.store.get_users_whose_devices_changed(
|
||||
since_token.device_list_key, users_we_track
|
||||
since_token.device_list_key, tracked_users
|
||||
)
|
||||
|
||||
# Step 1b, check for newly joined rooms
|
||||
|
@ -1169,7 +1171,7 @@ class SyncHandler(object):
|
|||
newly_left_users.update(left_users)
|
||||
|
||||
# Remove any users that we still share a room with.
|
||||
newly_left_users -= users_we_track
|
||||
newly_left_users -= users_who_share_room
|
||||
|
||||
return DeviceLists(changed=users_that_have_changed, left=newly_left_users)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue