ansible-infra/docs/guides/matrix-taking-moderation-action.md
lilly f7c3e2146d
All checks were successful
/ build (pull_request) Successful in 50s
/ Ansible Lint (pull_request) Successful in 2m53s
/ cleanup-staging (pull_request) Successful in 37s
/ build (push) Successful in 56s
/ Ansible Lint (push) Successful in 3m8s
migrate mjolnir to draupnir
2026-09-06 14:40:45 +02:00

2 KiB

title
Matrix: Taking Moderation Action

!!! success "Goal"

Perform common moderation actions in Matrix using our moderation bot

See the Matrix-Moderation Concept for an overview on how the moderation system functions.

All bot actions are triggered through the CCCHH Moderation Management room.

!!! warning "Warning"

Moderation actions should be triggered through the bot to avoid exposing members of the moderation team to harassment.
Even if the bot is unwieldy, think before taking action with your personal account and do so on your own scrutiny.

Banning a User

!draupnir ban general user <glob> <reason>
  • <glob> can be a user ID (e.g. @example:matrix.org) but also more sophisticated. Be careful when using actual glob syntax as whole servers can be banned even if just a single user is the intended target.
  • <reason> is technically optional but should always be supplied so that we know why a certain user was banned in retrospect. The bot supports parsing quotations so "<reason>" is usually what you want if more than one word is used.

Banning a Server

!draupnir ban server <glob> <reason>
  • <glob> can be used to ban subdomains of a domain too, e.g. *.example.com. If used, an additional --force is required after the whole command.
  • <reason> should be supplied and supports quotation (`"") if more than one word is used
  • When a domain is banned, we usually also ban all subdomains too. This needs to be done in two separate commands.

Redacting a single Message

!draupnir redact <permalink>
  • <permalink> is not the message ID but the actual https://matrix.to/#blablabla link that can be retrieved with most clients through a Share or Copy link to Message button on an individual message.

Redacting all Messages of a User

!draupnir redact <user-id>
  • user-id the Matrix-ID of the user of whom all messages in all rooms should be redacted (e.g. @bla:example.com).