diff options
author | Erik Johnston <erik@matrix.org> | 2022-02-22 12:26:17 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2022-02-22 12:26:17 +0000 |
commit | 07f82ac29be42098ab5b135cb173437f9cd7c754 (patch) | |
tree | 52ede505210af0dd06421e9644fa09705d4703cd /synapse/handlers/device.py | |
parent | Recommend upgrading treq alongside twisted (#11943) (diff) | |
parent | Update changelog (diff) | |
download | synapse-07f82ac29be42098ab5b135cb173437f9cd7c754.tar.xz |
Merge branch 'release-v1.53'
Diffstat (limited to 'synapse/handlers/device.py')
-rw-r--r-- | synapse/handlers/device.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/synapse/handlers/device.py b/synapse/handlers/device.py index b184a48cb1..36c05f8363 100644 --- a/synapse/handlers/device.py +++ b/synapse/handlers/device.py @@ -495,13 +495,11 @@ class DeviceHandler(DeviceWorkerHandler): "Notifying about update %r/%r, ID: %r", user_id, device_id, position ) - room_ids = await self.store.get_rooms_for_user(user_id) - # specify the user ID too since the user should always get their own device list # updates, even if they aren't in any rooms. - self.notifier.on_new_event( - "device_list_key", position, users=[user_id], rooms=room_ids - ) + users_to_notify = users_who_share_room.union({user_id}) + + self.notifier.on_new_event("device_list_key", position, users=users_to_notify) if hosts: logger.info( |