From 65b1db721d1269936b4c9b3d4a8f0fc4250c9f94 Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Tue, 15 Apr 2025 18:24:22 +0100 Subject: [PATCH] Describe behaviour when the `topic` key is falsey in a `m.room.topic` event. (#2068) We seem to have [updated this for m.room.name](https://github.com/matrix-org/matrix-spec/pull/1639) some years back but omitted it for topic. --- .../client_server/newsfragments/2068.clarification | 1 + data/event-schemas/schema/m.room.topic.yaml | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 changelogs/client_server/newsfragments/2068.clarification diff --git a/changelogs/client_server/newsfragments/2068.clarification b/changelogs/client_server/newsfragments/2068.clarification new file mode 100644 index 00000000..1b3c13e8 --- /dev/null +++ b/changelogs/client_server/newsfragments/2068.clarification @@ -0,0 +1 @@ +Clarify behaviour when the `topic` key of a `m.room.topic` event is absent, null, or empty. diff --git a/data/event-schemas/schema/m.room.topic.yaml b/data/event-schemas/schema/m.room.topic.yaml index 78a3d878..56f0caf9 100644 --- a/data/event-schemas/schema/m.room.topic.yaml +++ b/data/event-schemas/schema/m.room.topic.yaml @@ -1,7 +1,14 @@ --- allOf: - $ref: core-event-schema/state_event.yaml -description: 'A topic is a short message detailing what is currently being discussed in the room. It can also be used as a way to display extra information about the room, which may not be suitable for the room name. The room topic can also be set when creating a room using `/createRoom` with the `topic` key.' +description: |- + A topic is a short message detailing what is currently being discussed in the room. + It can also be used as a way to display extra information about the room, which may not + be suitable for the room name. + The room topic can also be set when creating a room using `/createRoom` with the `topic` key.' + + If the `topic` property is absent, null, or empty then the topic is unset. In other words, + an empty `topic` property effectively resets the room to having no topic. properties: content: properties: