mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 04:24:56 -04:00
Update get_users_in_room
mis-use to get hosts with dedicated get_current_hosts_in_room
(#13605)
See https://github.com/matrix-org/synapse/pull/13575#discussion_r953023755
This commit is contained in:
parent
d58615c82c
commit
1a209efdb2
6 changed files with 31 additions and 17 deletions
|
@ -310,6 +310,7 @@ class DeviceHandler(DeviceWorkerHandler):
|
|||
super().__init__(hs)
|
||||
|
||||
self.federation_sender = hs.get_federation_sender()
|
||||
self._storage_controllers = hs.get_storage_controllers()
|
||||
|
||||
self.device_list_updater = DeviceListUpdater(hs, self)
|
||||
|
||||
|
@ -694,8 +695,11 @@ class DeviceHandler(DeviceWorkerHandler):
|
|||
|
||||
# Ignore any users that aren't ours
|
||||
if self.hs.is_mine_id(user_id):
|
||||
joined_user_ids = await self.store.get_users_in_room(room_id)
|
||||
hosts = {get_domain_from_id(u) for u in joined_user_ids}
|
||||
hosts = set(
|
||||
await self._storage_controllers.state.get_current_hosts_in_room(
|
||||
room_id
|
||||
)
|
||||
)
|
||||
hosts.discard(self.server_name)
|
||||
|
||||
# Check if we've already sent this update to some hosts
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue