element-hq / element-hq/synapse

Synapse doesn't send out device list updates to previously unseen homeservers when joining a room

Open
#11,374 5 comments 0 reactions 1 assignee Claimed by @kegsay View on GitHub
A-Spec-Compliance S-Minor T-Defect
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

This issue has been migrated from [#11374](https://github.com/matrix-org/synapse/issues/11374).

---

The spec [says that](https://spec.matrix.org/v1.1/server-server-api/#device-management):

> Servers must send m.device_list_update EDUs to all the servers who share a room with a given local user, and must be sent whenever that user’s device list changes (i.e. for new or deleted devices, **when that user joins a room which contains servers which are not already receiving updates for that user’s device list**, or changes in device information such as the device’s human-readable name).

Which to be clear, means that upon a local user joining a room, we should:

1. Check if any of the other homeservers in the room are new to us (their users don't share any other rooms with us)
2. Send device list updates of the joining user to those homeservers.

It doesn't appear that Synapse actually does this anywhere, currently.

We also need to do this for presence (https://github.com/matrix-org/synapse/issues/8956), but the current presence-related TODO in the code may be a good inspiration for what a device list related implementation would look like:

https://github.com/matrix-org/synapse/blob/75ca0a6168f92dab3255839cf85fb0df3a0076c3/synapse/handlers/presence.py#L1368-L1379

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.