element-hq / element-hq/synapse
Room `summary` is only provided for lazy loading /syncs
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
This issue has been migrated from [#15017](https://github.com/matrix-org/synapse/issues/15017).
---
As noted by @S7evinK [here](https://github.com/matrix-org/complement/pull/597#issuecomment-1420348138):
> Also see https://github.com/matrix-org/complement/pull/553 and https://github.com/matrix-org/matrix-spec/issues/1325, where we came to the conclusion, for now, that it's not clear by the spec when this field should be added.
Looking at `RoomSummary` and the `m.heroes`, it states that this is **required**, if the room has neither `m.room.name` nor `m.room.canonical_alias`. So given a room can have neither (e.g. DMs), shouldn't Synapse include a `RoomSummary`, no matter if lazy loading or not?
Synapse only provides a room `summary` in /sync responses when lazy loading is enabled. However, [the spec](https://spec.matrix.org/latest/client-server-api/#get_matrixclientv3sync) says that many of `summary`'s fields (but not `summary` itself) are required under some conditions. eg. `m.heroes` is required if the room’s `m.room.name` or `m.room.canonical_alias` state events are unset or empty.
We should provide a room summary under the conditions mentioned by the spec and not just when lazy loading.
Contributor guide
Research direction
Start with Synapse's /sync implementation and the RoomSummary handling, then compare its current behavior with the Matrix client-server specification conditions described in the issue. Verify responses for rooms without m.room.name or m.room.canonical_alias, with and without lazy loading. Done means summaries are included whenever the specification requires them, rather than only when lazy loading is enabled.
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
- 35/100