Skip to content

MSC3784: Using room type of m.policy for policy rooms#3784

Open
FSG-Cat wants to merge 6 commits intomatrix-org:mainfrom
FSG-Cat:FSG-Cat-Policy-List-Room-Type
Open

MSC3784: Using room type of m.policy for policy rooms#3784
FSG-Cat wants to merge 6 commits intomatrix-org:mainfrom
FSG-Cat:FSG-Cat-Policy-List-Room-Type

Conversation

@FSG-Cat
Copy link
Copy Markdown
Contributor

@FSG-Cat FSG-Cat commented Apr 25, 2022

Rendered

This simple MSC aims to help stakeholders know if its likely to be a room containing a policy list or not.

Signed-off-by: Catalan Lover [email protected]


SCT Stuff

MSC checklist

FCP tickyboxes

FSG-Cat added 4 commits April 25, 2022 21:00
…X-Using-room-type-of-m.policy-for-policy-rooms.md
…sing-room-type-of-m.policy-for-policy-rooms.md
…d to 3784-using-room-type-of-m.policy-for-policy-rooms.md
@uhoreg uhoreg added proposal-in-review proposal A matrix spec change proposal kind:maintenance MSC which clarifies/updates existing spec needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. labels Apr 25, 2022
Comment thread proposals/3784-using-room-type-of-m.policy-for-policy-rooms.md
Comment on lines +19 to +25
limited capacity. This proposal expands this system to help all stakeholders quickly identify
policy rooms in a machine compatible way that is computationally cheap. It has additional benefits like
allowing clients that are capable of editing policy to display editing tools for policy rooms when they
detect that a room is a policy room using this mechanic. For machine interaction with policy rooms this
proposal supplies a very fast way to tell if a room is definitively supposed to be a policy room or if
the user might have supplied a legacy room or typed in the wrong room ID / alias depending on how things
are configured.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

To expand on this a bit, I really need something like this. Without this you run into a bootstrapping issue. Is this room supposed to be a policy room before the first policy is sent?

Without a room type you need to inspect the full room state to look for policy rules before you switch to the policy editor design. Slash commands can't warn the user properly that they are sending the rule into the wrong room.

So yes, I very much need this to provide a nice experience in my client. I can somewhat paper over it using account data, but it is not great. Everywhere we are told rooms are cheap. So far no rooms send policy rules into rooms you can send messages in. Most moderation tools even make it impossible to message in policy rooms, since that could possibly break the policy room when you actually need it to fight spam.

Thank you for writing this MSC!

Added improved information about what to do after the MSC gets merged.
Gnuxie added a commit to matrix-org/mjolnir that referenced this pull request Oct 17, 2022
matrix-org/matrix-spec-proposals#3784

This was extracted from the appservice mjolnir work to reduce review burden.
Gnuxie added a commit to matrix-org/mjolnir that referenced this pull request Oct 17, 2022
matrix-org/matrix-spec-proposals#3784

This was extracted from the appservice mjolnir work to reduce review burden.
Gnuxie added a commit to matrix-org/mjolnir that referenced this pull request Oct 19, 2022
matrix-org/matrix-spec-proposals#3784

This was extracted from the appservice mjolnir work to reduce review burden.
Gnuxie added a commit to matrix-org/mjolnir that referenced this pull request Oct 19, 2022
matrix-org/matrix-spec-proposals#3784

This was extracted from the appservice mjolnir work to reduce review burden.
@@ -0,0 +1,65 @@
# MSC3784 Using room type of m.policy for policy rooms
Copy link
Copy Markdown
Contributor Author

@FSG-Cat FSG-Cat Nov 27, 2022

Choose a reason for hiding this comment

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

Making this thread to track Implementation status outside of the PR descript.

Implementation Tracking

Mjolnir as of da08432 and that commit is included in Release 1.6.0. Mjolnir implementation at time of writing only includes that it creates rooms for policy lists with the type.
Nheko in mtxclient has added initial support to recognise it in 4bd39bce. Further progres unknown at time of writing.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does Nheko use it besides just declaring the constant?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Policy Editing that utilises MSC3784 to aid in detecting if a room is a policy list is implemented in RMU. Version that implemented first is unknown but current Version as of writing relies on this as one of its 2 detection methods. It also supports legacy detection.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

https://mru.rory.gay/PolicyLists is the particular page in RMU that uses this MSC to find policy rooms. I'm not sure whether it has legacy detection enabled or not, but legacy detection here was implemented by checking for the Mjolnir shortcode state event. It does not show rooms that happen to have policy events, as querying /sync or /state for rooms is very expensive, especially compared to cherry picking 2 events.

(Oops, I still have to get rid of the "Create policy list" popup being there by default, which also uses the MSC's unstable type on room creation, additionally I've just uncovered a crash related to fetching room names... That's for the tomorrow pile).

aichafellouss added a commit to aichafellouss/Draupnir that referenced this pull request Oct 19, 2025
matrix-org/matrix-spec-proposals#3784

This was extracted from the appservice mjolnir work to reduce review burden.
Copy link
Copy Markdown
Member

@turt2live turt2live left a comment

Choose a reason for hiding this comment

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

My general feeling is this is something we should have in the spec to identify rooms dedicated to containing policy list recommendations. There might still be some rooms which want to mix recommendations with conversation - those rooms wouldn't use this type and might not get the benefits of dedicated UX from a client, but that's okay.

I've given this MSC a sizable editorial review. It's not my intention to completely change how this proposal works, so if that's happened then please correct me 😅. The editorial comments here reflect that ~650 MSCs have been opened in the time since this one was, and that modern MSCs are typically held to a different standard than older ones. I've also tried to make some areas a bit more clear & concise, as would happen in normal review.

My approval denotes that the MSC is ready for proposed-FCP with the edits (or something reasonably close). The listed implementations appear to satisfy the requirements we'd have for this proposal.

Comment thread proposals/3784-using-room-type-of-m.policy-for-policy-rooms.md Outdated
Comment thread proposals/3784-using-room-type-of-m.policy-for-policy-rooms.md Outdated
Comment thread proposals/3784-using-room-type-of-m.policy-for-policy-rooms.md Outdated
Comment thread proposals/3784-using-room-type-of-m.policy-for-policy-rooms.md Outdated
Comment thread proposals/3784-using-room-type-of-m.policy-for-policy-rooms.md Outdated
Comment thread proposals/3784-using-room-type-of-m.policy-for-policy-rooms.md Outdated
Comment thread proposals/3784-using-room-type-of-m.policy-for-policy-rooms.md Outdated
@turt2live turt2live added client-server Client-Server API safety and removed needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. labels Mar 20, 2026
@github-project-automation github-project-automation bot moved this to Tracking for review in Spec Core Team Workflow Mar 20, 2026
@turt2live turt2live moved this from Tracking for review to Proposed for FCP readiness in Spec Core Team Workflow Mar 20, 2026
@turt2live
Copy link
Copy Markdown
Member

MSCs proposed for Final Comment Period (FCP) should meet the requirements outlined in the checklist prior to being accepted into the spec. This checklist is a bit long, but aims to reduce the number of follow-on MSCs after a feature lands.

SCT members: please check off things you check for, and raise a concern against FCP if the checklist is incomplete. If an item doesn't apply, prefer to check it rather than remove it. Unchecking items is encouraged where applicable.

MSC authors: feel free to ask in a thread on your MSC or in the#matrix-spec:matrix.org room for clarification of any of these points.

  • Are appropriate implementation(s) specified in the MSC’s PR description?
  • Are all MSCs that this MSC depends on already accepted?
  • For each new endpoint that is introduced:
    • Have authentication requirements been specified?
    • Have rate-limiting requirements been specified?
    • Have guest access requirements been specified?
    • Are error responses specified?
      • Does each error case have a specified errcode (e.g. M_FORBIDDEN) and HTTP status code?
        • If a new errcode is introduced, is it clear that it is new?
  • Will the MSC require a new room version, and if so, has that been made clear?
    • Is the reason for a new room version clearly stated? For example, modifying the set of redacted fields changes how event IDs are calculated, thus requiring a new room version.
  • Are backwards-compatibility concerns appropriately addressed?
  • Are the endpoint conventions honoured?
    • Do HTTP endpoints use_underscores_like_this?
    • Will the endpoint return unbounded data? If so, has pagination been considered?
    • If the endpoint utilises pagination, is it consistent with the appendices?
  • An introduction exists and clearly outlines the problem being solved. Ideally, the first paragraph should be understandable by a non-technical audience.
  • All outstanding threads are resolved
    • All feedback is incorporated into the proposal text itself, either as a fix or noted as an alternative
  • While the exact sections do not need to be present, the details implied by the proposal template are covered. Namely:
    • Introduction
    • Proposal text
    • Potential issues
    • Alternatives
    • Dependencies
  • Stable identifiers are used throughout the proposal, except for the unstable prefix section
    • Unstable prefixes consider the awkward accepted-but-not-merged state
    • Chosen unstable prefixes do not pollute any global namespace (use “org.matrix.mscXXXX”, not “org.matrix”).
  • Changes have applicable Sign Off from all authors/editors/contributors
  • There is a dedicated "Security Considerations" section which detail any possible attacks/vulnerabilities this proposal may introduce, even if this is "None.". See RFC3552 for things to think about, but in particular pay attention to the OWASP Top Ten.

@turt2live
Copy link
Copy Markdown
Member

@mscbot fcp merge

@mscbot
Copy link
Copy Markdown
Collaborator

mscbot commented Mar 23, 2026

Team member @mscbot has proposed to merge this. The next step is review by the rest of the tagged people:

Concerns:

  • Confusing behavior around whether or not conversation occurs in policy rooms.

Once at least 75% of reviewers approve (and there are no outstanding concerns), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for information about what commands tagged team members can give me.

@mscbot mscbot added proposed-final-comment-period Currently awaiting signoff of a majority of team members in order to enter the final comment period. disposition-merge labels Mar 23, 2026
@turt2live turt2live added the 00-weekly-pings Tracking for weekly pings in the SCT office. 00 to make it first in the labels list. label Mar 23, 2026
@turt2live turt2live moved this from Proposed for FCP readiness to Ready for FCP ticks in Spec Core Team Workflow Mar 23, 2026
Comment on lines +25 to +26
Consumers of policy lists SHOULD note that recommendations can still appear
outside of `m.policy` rooms. Existing rooms probably won't have the new room
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

SHOULD feels slightly odd to me here because consumers have complete freedom in how they handle (or don't handle) policy recommendations. There is nothing normative here and I think this should rather be a remark.

Suggested change
Consumers of policy lists SHOULD note that recommendations can still appear
outside of `m.policy` rooms. Existing rooms probably won't have the new room
Consumers of policy lists should note that recommendations can still appear
outside of `m.policy` rooms. Existing rooms probably won't have the new room

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This part may be a bit wierdly worded due to being translated from the old legacy rooms handling that the MSC defined. And yes a strong but optional world like SHOULD is correct to the intent.

The intended way this is meant to be handled is that policy manipulation tooling should allow you to override the automatic detection the room type gives you and instead use manual detection. Be that temporary as in not persisted or persisted personal overrides stored via implementation specific means.

Secondary detection measures like checking for shortcode is also allowed but as @TheArcaneBrony can testify to its cludgy compared to pure room type detection.

Comment on lines +53 to +54
implementations. For example, if hiding the rooms then notifications in those
rooms will need some consideration.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Missing notifications feels like a potential issue rather than a security consideration to me. Should there be a note in the proposal section that m.policy rooms can still include normal conversation? We already have the complementary remark there that regular rooms can still contain policy lists.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hidden/unobtainable notifications are occasionally considered a security concern in an implementation because of the disruption they cause. That's the only reason to mention it here.

m.policy rooms should not contain conversation, per the MSC.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

m.policy rooms should not contain conversation, per the MSC.

The proposal doesn't seem to explicitly say that. It speaks of "rooms dedicated to containing policy list recommendations" which may intend to say just that but this isn't very clear in my opinion.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There is no enforcement what so ever so your client should NOT trust that nobody in the long history of doing things like this for the lulz on matrix, decides to make a policy list with room type and short code and all just to have it as their offtopic lounge style room.

Like i have a long history of seeing people intentionally toy with edge cases like this on matrix and so does several SCT members.

Enforcement would require a room version and that is unneeded complexity. Policy lists should always already be created via specialised tools that will prevent these types of situations via strategic configuration of the powerlevels for non creators. This is because normal clients cant set room types for non space rooms. Only specialised clients or power user / developer clients will have the ability to fall into this trap. And when your using a client that intentionally lets you use the full power of matrix and has no guardrails against footguns you are on your own.

Does MSC1772 explicitly define that conversation can not exist in a space as far as auth rules are concerned? I refer to the Spaces MSC for one simple reason. It should already have debated to death this concern as this MSC is essentially the same type of MSC just for policy lists instead of introducing the concept of spaces and room types.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Spaces left whether a conversation can happen in the room as an implementation detail because it was theorized as possibly useful.

Comment on lines +27 to +28
type, and some communities might mix conversation and recommendations in the
same room (therefore not dedicating the room to recommendations).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is very confusing and I don't understand what it is recommending. I understand at a protocol level you can send whatever you want into room, but what's the expected/recommended behavior? Is this like a space that it isn't expected to have conversation or is it expected?

@mscbot concern Confusing behavior around whether or not conversation occurs in policy rooms.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Policies live in a bit of a grey area there its essentially communicating. 99% of policy lists work just as spaces usually do. Pure Policies no conversations just like how Spaces usually are exclusively spaces nothing else.

Its just someone might decide to mix policies into conversation for some reason. Be that the original idea that Travis talked about in https://github.com/matrix-org/matrix-spec-proposals/pull/3784/changes#r858892009 or some other reason.

We are also trying to address what was refered to as the legacy problem originally. Aka what to do with policy lists like CME that predate the MSC or Matrix.org COC. Both these lists predate the MSC and predate the mjolnir support for the MSC that was later inherited by Draupnir and implemented by Meowlnir.

Some of this comment may potentially have to make it into the file in a more refined form ofc. Just not sure what if anything from this comment needs to land inside of the MSC it self.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Conversation is not mixed in policy rooms. The highlighted text is attempting to clarify that moderation policies can exist in rooms without the m.policy type.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The current text is confusing. I would make it clear that m.policy rooms are not expected to have conversation.

Maybe use a paragraph break to talk about legacy policy rooms and that nothing in this MSC applies to them?

@mscbot mscbot added the unresolved-concerns This proposal has at least one outstanding concern label Apr 8, 2026
Comment on lines +25 to +28
Consumers of policy lists SHOULD note that recommendations can still appear
outside of `m.policy` rooms. Existing rooms probably won't have the new room
type, and some communities might mix conversation and recommendations in the
same room (therefore not dedicating the room to recommendations).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
Consumers of policy lists SHOULD note that recommendations can still appear
outside of `m.policy` rooms. Existing rooms probably won't have the new room
type, and some communities might mix conversation and recommendations in the
same room (therefore not dedicating the room to recommendations).
Where the `m.policy` room type is used, conversation is not expected. Clients SHOULD note that moderation policies can appear in rooms without the `m.policy` type, where conversation could be present.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This change would not reflect the second more important reason why the type is lacking. Lists that predate the type. Other than that i think its a good suggestion.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I feel the suggestion implies the lack of type sufficiently. This will need line wrapping, but is otherwise great - thank you!

@clokep @Johennes - would this resolve your concerns around the MSC not spelling it out?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, I think that is clearer.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

00-weekly-pings Tracking for weekly pings in the SCT office. 00 to make it first in the labels list. client-server Client-Server API disposition-merge kind:maintenance MSC which clarifies/updates existing spec proposal A matrix spec change proposal proposed-final-comment-period Currently awaiting signoff of a majority of team members in order to enter the final comment period. safety unresolved-concerns This proposal has at least one outstanding concern

Projects

Status: Ready for FCP ticks

Development

Successfully merging this pull request may close these issues.

9 participants