element-hq / element-hq/synapse
Synapse sends unnecessary device list change entries
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
This issue has been migrated from [#6162](https://github.com/matrix-org/synapse/issues/6162).
---
With the lazy loading sync options enabled, synapse includes the current state events it thinks the client will need in order to render the events in the timeline section. The device list sync computation code includes these state events when working out what users have joined a room, so every time this happens, it generates a device change entry for that user too.
This will also presumably have happened when a user changed their profile information, so perhaps the most sensible fix here is for the sync code to look at the prev content for join events (it already looks at `prev_content` for `leave` events: [`synapse/handlers/sync.py#L1382`](https://github.com/matrix-org/synapse/blob/faf72a4c403000f7815d171feb8bf1a83b353584/synapse/handlers/sync.py#L1382-L1398)).
Contributor guide
Assessment
This issue has not been assessed yet.