-
Notifications
You must be signed in to change notification settings - Fork 392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MSC3765: Rich text in room topics #3765
Conversation
Signed-off-by: Johannes Marbach <[email protected]>
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
@@ -0,0 +1,96 @@ | |||
# MSC3765: Rich text in room topics |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alphapapa says:
On one hand, I can see some elegance in repurposing room topics for general-purpose, long-term room reference information. OTOH, it seems like overloading the purpose of topics with what, in other systems, would go in "pinned" topics or messages, or a wiki, etc.
So IMHO I would consider implementing support for pinned messages/events before overloading topics like this. It would seem relatively straightforward for a room's state to have a list of pinned events, which could be sent in initial sync by the server or be retrieved manually by clients. Clients could then display these pinned events in a room's timeline view, optionally hiding them, compressing them, etc. And the pinned events could be edited by room moderators using existing event-editing tools. (Forgive me if there's already a proposal for something like that.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alphapapa and others: please use threads on the diff to have your comments considered. This can be done by adding a line comment. If there's no obvious line for where to put a comment, please use the line containing the title. |
Not a blocking concern, but I'm a little worried that the |
Co-authored-by: Johannes Marbach <[email protected]>
@mscbot concern which order are the representations in? |
proposals/3765-rich-room-topics.md
Outdated
into a separate `content['m.text']` field. Lastly, the `m.topic` content | ||
block also serves as a good place for additional fields to be added by | ||
other MSCs in the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-blocking comment:
I don't entirely follow why we need an m.topic
block as a place to put extra fields (unless we think that we're going to end up with topics inside other event types?) but maybe that's my lack of familiarity with extensible events.
@ara4n as the person that proposed this (I think?) can you clarify?
Co-authored-by: Johannes Marbach <[email protected]>
@mscbot resolve which order are the representations in? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this LGTM now, other than the outstanding question at #3765 (comment)
"type": "m.room.topic", | ||
"state_key": "", | ||
"content": { | ||
"m.topic": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for clarity here (since we've always failed to spec this behavior outright). Should m.topic
be omitted if the topic was removed from the room, or empty array (or both because it amounts to the same thing?).
The implementation doesn't allow for this currently, and I'm just doing some cleanup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really have a strong opinion on this at all but in an attempt to make the decision feel less arbitrary: content["m.topic"]
will have to be optional because otherwise we'd make all existing topic events suddenly be incompatible. In other words, omitting m.topic
will have to be possible. Since that already provides us a way to remove the rich topic, we might as well say that this is the way. Happy to hear other thoughts, however.
🔔 This is now entering its final comment period, as per the review above. 🔔 |
The final comment period, with a disposition to merge, as per the review above, is now complete. |
On the server side, any logic that currently operates on the `topic` field is | ||
updated to use the `m.topic` content block instead: | ||
|
||
- In [`/_matrix/client/v3/createRoom`], the `topic` parameter should cause `m.room.topic` | ||
to be written with a `text/plain` mimetype in `m.topic`. If at the same time an | ||
`m.room.topic` event is supplied in `initial_state`, it is overwritten entirely. | ||
A future MSC may generalize the `topic` parameter to allow specifying other mime | ||
types without `initial_state`. | ||
- In [`GET /_matrix/client/v3/publicRooms`], [`GET /_matrix/federation/v1/publicRooms`] | ||
and their `POST` siblings, the `topic` response field should be read from the | ||
`text/plain` mimetype of `m.topic` if it exists or omitted otherwise. | ||
A plain text topic is sufficient here because this data is commonly | ||
only displayed to users that are *not* a member of the room yet. These | ||
users don't commonly have the same need for rich room topics as users | ||
who already reside in the room. A future MSC may update these endpoints | ||
to support rich text topics. | ||
- The same logic is applied to [`/_matrix/client/v1/rooms/{roomId}/hierarchy`] | ||
and [`/_matrix/federation/v1/hierarchy/{roomId}`]. | ||
- In [server side search], the `room_events` category is expanded to search | ||
over the `m.text` content block of `m.room.topic` events. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Johennes this bit doesn't seem to have been implemented in mainline synapse (unless I'm missing it): do we have a sample server-side implementation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, no. I actually never made a server implementation. Initially this proposal didn't have any server parts and then I guess I forgot the implementation when adding these later. 🤦
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better late than never: element-hq/synapse#18195
The advantage of having shunted the implementation is that it now can use stable identifiers directly. 😇
`m.room.topic` event is supplied in `initial_state`, it is overwritten entirely. | ||
A future MSC may generalize the `topic` parameter to allow specifying other mime | ||
types without `initial_state`. | ||
- In [`GET /_matrix/client/v3/publicRooms`], [`GET /_matrix/federation/v1/publicRooms`] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For reference: MSC3266 adds /room_summary
, defined to behave the same as /publicRooms
, so that will also need updating if the code isn't shared.
Rendered
Implementations:
In line with matrix-org/matrix-spec#1700, the following disclosure applies:
I am a Systems Architect at gematik, Software Engineer at Unomed, Matrix community member and former Element employee. This proposal was written and published with my community member hat on.
FCP tickyboxes