element-hq / element-hq/synapse

Changing display name trigger a device change

Open
#9,392 0 comments 0 reactions 0 assignees View on GitHub
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 [#9392](https://github.com/matrix-org/synapse/issues/9392).

---

### Description

### Steps to reproduce

- change the display name of the user, using `PUT https://matrix-client.matrix.org/_matrix/client/r0/profile/{userId}/displayname`
- It triggers some "join" membership event for every rooms, which is fine
- But it also triggers a device change of the current user in the next sync response:

```json
"device_lists": {
"changed": [
"@userId:matrix.org"
],
"left": []
},
```

- it has the effect to trigger download of device list, key query and lots of shield trust computation, with no reason.

So this is not good for the overall performance of the system (client and server side)

- other members, who share at least a room with the one who change their display name seem not affected by this extra device list change.

### Version information

- **Homeserver**: matrix.org `{"server_version":"1.27.0rc1 (b=matrix-org-hotfixes,844b3e3f6)","python_version":"3.7.3"}`

Contributor guide

Open the contributing guide

Research direction

Start by tracing the PUT /_matrix/client/r0/profile/{userId}/displayname entry point through the next sync response, focusing on device_lists.changed for the user who changed their name. Reproduce the profile update and verify that it does not cause an unnecessary device-list download or key query, while preserving the expected room membership events.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.