file
policy_rules.hpppolicy rules for room moderation
With Matrix being an open network where anyone can participate, a very wide range of content exists and it is important that users are empowered to select which content they wish to see, and which content they wish to block. By extension, room moderators and server admins should also be able to select which content they do not wish to host in their rooms and servers.
The protocol’s position on this is one of neutrality: it should not be deciding what content is undesirable for any particular entity and should instead be empowering those entities to make their own decisions. As such, a generic framework for communicating “moderation policy lists” or “moderation policy rooms” is described. Note that this module only describes the data structures and not how they should be interpreting: the entity making the decisions on filtering is best positioned to interpret the rules how it sees fit.
Moderation policy lists are stored as room state events. There are no restrictions on how the rooms can be configured (they could be public, private, encrypted, etc).
There are currently 3 kinds of entities which can be affected by rules: user, server, and room. All 3 are described with m.policy.rule.<kind> state events. The state_key for a policy rule is an arbitrary string decided by the sender of the rule.
Rules contain recommendations and reasons for the rule existing. The reason is a human-readable string which describes the recommendation. Currently only one recommendation, m.ban, is specified.
Namespaces
- namespace mtx
- Top level namespace for mtxclient.
- namespace mtx::events
- Namespace for all events.
- namespace mtx::events::state
- Events, that can be used as a state event.
- namespace mtx::events::state::policy_rule::recommendation
- A recommendation of how to handle the entity.
Classes
- struct mtx::events::state::policy_rule::Rule
- Content of the
m.policy.rule.*
events.