A moderation tool for Matrix
Go to file
2019-10-09 14:46:14 +01:00
config Add watch and unwatch commands 2019-10-08 20:58:31 +01:00
src Don't double report success for !mjolnir sync 2019-10-09 14:46:14 +01:00
.dockerignore Absolute bare minimum for a bot 2019-09-25 20:13:20 -06:00
.gitignore Absolute bare minimum for a bot 2019-09-25 20:13:20 -06:00
Dockerfile Absolute bare minimum for a bot 2019-09-25 20:13:20 -06:00
LICENSE Initial commit 2019-09-25 19:36:12 -06:00
package.json Upgrade matrix-bot-sdk 2019-10-08 01:28:20 +01:00
README.md Support multiple ban lists 2019-10-08 17:57:03 +01:00
tsconfig.json Absolute bare minimum for a bot 2019-09-25 20:13:20 -06:00
tslint.json Fix tlsint 2019-09-27 13:54:34 -06:00
yarn.lock Upgrade matrix-bot-sdk 2019-10-08 01:28:20 +01:00

mjolnir

A moderation tool for Matrix. Visit #mjolnir:matrix.org for more information.

Features

TODO: Describe what all this means.

Phase 1:

  • Ban users
  • ACL servers
  • Update lists with new bans/ACLs

Phase 2:

  • Pantalaimon support
  • No-op mode (for verifying behaviour)
  • Redact messages on ban (optionally)
  • More useful spam in management room
  • Command to import ACLs, etc from rooms
  • Vet rooms on startup option
  • Command to actually unban users (instead of leaving them stuck)
  • Support multiple lists

Phase 3:

  • Synapse antispam module
  • Room upgrade handling (both protected+list rooms)
  • Support community-defined scopes? (ie: no hardcoded config)
  • Riot hooks (independent of mjolnir?)

Docker (preferred)

Mjolnir is on Docker Hub as matrixdotorg/mjolnir but can be built yourself with docker build -t mjolnir ..

git clone https://github.com/matrix-org/mjolnir.git
cd mjolnir

# Copy and edit the config. It is not recommended to change the data path.
mkdir -p /etc/mjolnir
cp config/default.yaml /etc/mjolnir/production.yaml
nano /etc/mjolnir/production.yaml

docker run --rm -it -v /etc/mjolnir:/data matrixdotorg/mjolnir:latest

Build it

This bot requires yarn and Node 10.

git clone https://github.com/matrix-org/mjolnir.git
cd mjolnir

yarn install
yarn build

# Copy and edit the config. It *is* recommended to change the data path.
cp config/default.yaml config/development.yaml
nano config/development.yaml

node lib/index.js

Development

TODO. It's a TypeScript project with a linter.