mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-12-15 15:38:47 -05:00
Send device list updates out to servers in partially joined rooms (#13874)
Use the provided list of servers in the room from the `/send_join` response, since we will not know which users are in the room. This isn't sufficient to ensure that all remote servers receive the right device list updates, since the `/send_join` response may be inaccurate or we may calculate the membership state of new users in the room incorrectly. Signed-off-by: Sean Quah <seanq@matrix.org>
This commit is contained in:
parent
c06b2b7142
commit
03c2bfb7f8
4 changed files with 66 additions and 2 deletions
|
|
@ -688,11 +688,15 @@ class DeviceHandler(DeviceWorkerHandler):
|
|||
# Ignore any users that aren't ours
|
||||
if self.hs.is_mine_id(user_id):
|
||||
hosts = set(
|
||||
await self._storage_controllers.state.get_current_hosts_in_room(
|
||||
await self._storage_controllers.state.get_current_hosts_in_room_or_partial_state_approximation(
|
||||
room_id
|
||||
)
|
||||
)
|
||||
hosts.discard(self.server_name)
|
||||
# For rooms with partial state, `hosts` is merely an
|
||||
# approximation. When we transition to a full state room, we
|
||||
# will have to send out device list updates to any servers we
|
||||
# missed.
|
||||
|
||||
# Check if we've already sent this update to some hosts
|
||||
if current_stream_id == stream_id:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue