-
Notifications
You must be signed in to change notification settings - Fork 377
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Johannes Marbach <johannesm@element.io>
Co-authored-by: Travis Ralston <travisr@matrix.org>
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. |
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.
Generally this lgtm - thanks for updating it :)
This comment was marked as duplicate.
This comment was marked as duplicate.
## Unstable prefix | ||
|
||
While this MSC is not considered stable, `m.topic` should be referred to | ||
as `org.matrix.msc3765.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.
@jplatte says:
The current implementation in the JS SDK adds
"org.matrix.msc3765.topic"
as a content field to the existingm.room.topic
event, but this MSC documents a newm.topic
eventtype
. Is the JS SDK implementation just outdated?
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.
The JS SDK implements an earlier version of this MSC, yes.
This hasn't been touched for over a year, is there any ETA as to when it'll go live? |
Sorry, I'm not currently able to follow through on this myself. However, if you're interested, you could adopt ownership over this MSC. |
what would be the work that needs to be done? time effort? skills necessary? ... |
The unresolved comments need to be addressed and afterwards I think it could be sent through FCP which might yield further comments. Update (2024-02-23): I've resolved the remaining comments and raised the proposal with the SCT. |
* Clarify and simplify transition logic * Clarify the case of HTML-only topics
Hi, what is the state about this PR? AFAIK, Markdown in Room topics (my use-case) is not yet supported. This conversation looks like everything looks good, is there anything stopping it from getting merged? |
it has been added to development/nightly, and seems to be working there flawlessly for a long time - from my own testing |
## Unstable prefix | ||
|
||
While this MSC is not considered stable, `m.topic` should be referred to | ||
as `org.matrix.msc3765.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.
## Unstable prefix | |
While this MSC is not considered stable, `m.topic` should be referred to | |
as `org.matrix.msc3765.topic`. | |
## Other notes | |
Normally extensible events would only be permitted in a specific room version. | |
However, this proposal's event is permitted in any room version. The stable | |
event type should only be sent in a room version which supports extensible | |
events, however. | |
## Unstable prefix | |
While this MSC is not considered stable, `m.topic` should be referred to as | |
`org.matrix.msc3765.topic`. Note that extensible events and content blocks | |
might have their own prefixing requirements. | |
### Implementation considerations | |
Implementation authors should note that as a feature using the Extensible Events | |
system, usage of the *stable* event type `m.topic` in regular room versions is not | |
permitted. As of writing (August 2024), Extensible Events does not have a *stable* | |
room version which supports such events. Therefore, implementations will have to | |
use the *unstable* event type if they intend to support rich text in room topics in | |
existing room versions. | |
When Extensible Events as a system is released in a dedicated room version, clients | |
will be able to use the stable event type there. The unstable event type should | |
not be used in that dedicated room version. |
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.
Normally extensible events would only be permitted in a specific room version. However, this proposal's event is permitted in any room version. The stable event type should only be sent in a room version which supports extensible events, however.
So in this case you'd expect both the unstable version and m.room.topic
? I'm not quite sure what this means.
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, good question. Forbidding m.room.topic
in existing room versions feels wrong. Maybe this situation calls for the coexistence of both org.matrix.msc3765.topic
and m.room.topic
with rules for reading and writing the topic in a room:
- If
org.matrix.msc3765.topic
exists, use that. Otherwise fall back tom.room.topic
. - When writing
org.matrix.msc3765.topic
, also writem.room.topic
with just the plain text topic.
Does that sound sensible?
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 think it sounds sensible, but it is just a bit finicky / complicated. E.g.:
- You have both
m.topic
andm.room.topic
set from a "modern" client, nominally the values are the same. - Someone using an "old" client updates the topic, but only
m.room.topic
is updated. - Users now see two different topics depending on what client they're using.
(This is also a potential security issue of presenting different information to different users, although it wouldn't be hidden per-say, just a display issue.)
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.
Yeah, true. 😕
The current implementation in Element Web actually has that problem even though it embedded the rich topic into m.room.topic
(which was the first version of this proposal).
I don't think we can really avoid that unless we restrict m.topic
to a new room version that forbids m.room.topic
. Maybe pointing out the risk for early implementers in the proposal would suffice?
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 have a better idea. Would be interested to hear from others though.
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.
In reconsidering this, I think it may be better to revert to not allowing the use of m.topic
in current room versions. This was originally proposed in an attempt to mimic the approach taken for polls in MSC3381. However, polls introduce entirely new events and, hence, are not subject to the same compatibility and security problems that replacing m.room.topic
causes. Instead of this, I think we should take the approach from MSC1767 and require a new room version for m.topic
.
Therefore, I propose not to apply the suggestion at the start of this thread. I don't believe this should prevent this proposal from going through FCP and, if successful, be merged without being added to the spec yet (which is how MSC1767 itself was treated, too).
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.