mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-12-10 16:14:32 -05:00
Only send out device list updates for our own users (#12465)
Broke in #12365
This commit is contained in:
parent
535a689cfc
commit
0b014eb25e
5 changed files with 56 additions and 8 deletions
|
|
@ -649,9 +649,13 @@ class DeviceHandler(DeviceWorkerHandler):
|
|||
return
|
||||
|
||||
for user_id, device_id, room_id, stream_id, opentracing_context in rows:
|
||||
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.discard(self.server_name)
|
||||
hosts = set()
|
||||
|
||||
# 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.discard(self.server_name)
|
||||
|
||||
# Check if we've already sent this update to some hosts
|
||||
if current_stream_id == stream_id:
|
||||
|
|
|
|||
|
|
@ -1703,7 +1703,9 @@ class DeviceStore(DeviceWorkerStore, DeviceBackgroundUpdateStore):
|
|||
next(stream_id_iterator),
|
||||
user_id,
|
||||
device_id,
|
||||
False,
|
||||
not self.hs.is_mine_id(
|
||||
user_id
|
||||
), # We only need to send out update for *our* users
|
||||
now,
|
||||
encoded_context if whitelisted_homeserver(destination) else "{}",
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue