Skip to content

Add tests for rich topic handling (previously MSC3765)#788

Merged
MadLittleMods merged 7 commits into
matrix-org:mainfrom
Johennes:johannes/msc3765
Jul 15, 2025
Merged

Add tests for rich topic handling (previously MSC3765)#788
MadLittleMods merged 7 commits into
matrix-org:mainfrom
Johennes:johannes/msc3765

Conversation

@Johennes
Copy link
Copy Markdown
Contributor

@Johennes Johennes commented Jul 9, 2025

Rich topics landed with Matrix 1.15. These tests were broken out from https://github.com/element-hq/synapse/pull/18195/files#r2170245892.

Pull Request Checklist

Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
@Johennes Johennes marked this pull request as ready for review July 9, 2025 09:19
@Johennes Johennes requested review from a team as code owners July 9, 2025 09:19
Comment on lines +99 to +100
// POST /createRoom makes a room with a topic via initial_state overwritten by topic
t.Run("POST /createRoom makes a room with a topic via initial_state overwritten by topic", func(t *testing.T) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For my own reference, this behavior is spec'ed in the /createRoom endpoint, https://spec.matrix.org/v1.14/client-server-api/#post_matrixclientv3createroom

The server MUST apply the normal state resolution rules when creating the new room, including checking power levels for each event. It MUST apply the events implied by the request in the following order:

[...]
6. Events listed in initial_state, in the order that they are listed.
7. Events implied by name and topic (m.room.name and m.room.topic state events).
[...]

Comment thread tests/csapi/apidoc_room_create_test.go
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
Comment thread tests/csapi/apidoc_room_create_rich_topic_test.go Outdated
Johennes added 2 commits July 14, 2025 08:21
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
@Johennes Johennes requested a review from MadLittleMods July 14, 2025 06:27
Comment thread tests/csapi/apidoc_room_create_test.go
Comment thread tests/csapi/apidoc_room_create_test.go Outdated
Johennes added 2 commits July 15, 2025 08:31
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
@Johennes Johennes requested a review from MadLittleMods July 15, 2025 06:42
Comment thread tests/csapi/apidoc_room_create_test.go Outdated
Comment thread tests/csapi/apidoc_room_create_test.go Outdated
@MadLittleMods MadLittleMods merged commit bdeba28 into matrix-org:main Jul 15, 2025
4 checks passed
@MadLittleMods
Copy link
Copy Markdown
Collaborator

Thanks for adding Complement tests for this @Johennes 🐍

jevolk pushed a commit to matrix-construct/complement that referenced this pull request Jul 22, 2025
Rich topics landed with Matrix 1.15.

These tests were broken out from https://github.com/element-hq/synapse/pull/18195/files#r2170245892.

Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants