element-synapse/synapse/api
Johannes Marbach b9b8775db7
Add plain-text handling for rich-text topics as per MSC3765 (#18195)
This implements
https://github.com/matrix-org/matrix-spec-proposals/pull/3765 which is
already merged and, therefore, can use stable identifiers.

For `/publicRooms` and `/hierarchy`, the topic is read from the
eponymous field of the `current_state_events` table. Rather than
introduce further columns in this table, I changed the insertion /
update logic to write the plain-text topic from the rich topic into the
existing field. This will not take effect for existing rooms unless
their topic is changed. However, existing rooms shouldn't have rich
topics to begin with.

Similarly, for server-side search, I changed the insertion logic of the
`event_search` table to prefer the value from the rich topic. Again,
existing events shouldn't have rich topics and, therefore, don't need to
be migrated in the table.

Spec doc: https://spec.matrix.org/v1.15/client-server-api/#mroomtopic

Part of supporting Matrix v1.15:
https://spec.matrix.org/v1.15/client-server-api/#mroomtopic

Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
Co-authored-by: Eric Eastwood <erice@element.io>
2025-07-09 14:13:54 -05:00
..
auth Forbid locked users from using POST /login (#18594) 2025-07-02 18:18:33 +02:00
__init__.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
auth_blocking.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
constants.py Add plain-text handling for rich-text topics as per MSC3765 (#18195) 2025-07-09 14:13:54 -05:00
errors.py Forbid locked users from using POST /login (#18594) 2025-07-02 18:18:33 +02:00
filtering.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
presence.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
ratelimiting.py Lift pausing on ratelimited requests to http layer (#18595) 2025-06-25 14:32:55 +00:00
room_versions.py Support MSC3757: Restricting who can overwrite a state event (#17513) 2024-09-26 15:25:05 +02:00
urls.py Consolidate SSO redirects through /_matrix/client/v3/login/sso/redirect(/{idpId}) (#17972) 2024-11-29 11:26:37 -06:00