mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-26 14:19:22 -05:00
Notify users, rather than rooms, of device list updates (#11905)
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
This commit is contained in:
parent
63c46349c4
commit
55113dd5e8
1
changelog.d/11905.misc
Normal file
1
changelog.d/11905.misc
Normal file
@ -0,0 +1 @@
|
|||||||
|
Preparation to support sending device list updates to application services.
|
@ -495,13 +495,11 @@ class DeviceHandler(DeviceWorkerHandler):
|
|||||||
"Notifying about update %r/%r, ID: %r", user_id, device_id, position
|
"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
|
# specify the user ID too since the user should always get their own device list
|
||||||
# updates, even if they aren't in any rooms.
|
# updates, even if they aren't in any rooms.
|
||||||
self.notifier.on_new_event(
|
users_to_notify = users_who_share_room.union({user_id})
|
||||||
"device_list_key", position, users=[user_id], rooms=room_ids
|
|
||||||
)
|
self.notifier.on_new_event("device_list_key", position, users=users_to_notify)
|
||||||
|
|
||||||
if hosts:
|
if hosts:
|
||||||
logger.info(
|
logger.info(
|
||||||
|
Loading…
Reference in New Issue
Block a user