2019-09-26 01:36:12 +00:00
|
|
|
# mjolnir
|
2019-09-26 02:13:20 +00:00
|
|
|
|
2019-10-08 15:28:06 +00:00
|
|
|
A moderation tool for Matrix. Visit [#mjolnir:matrix.org](https://matrix.to/#/#mjolnir:matrix.org)
|
|
|
|
for more information.
|
2019-09-26 02:13:20 +00:00
|
|
|
|
|
|
|
## Features
|
|
|
|
|
|
|
|
TODO: Describe what all this means.
|
|
|
|
|
|
|
|
Phase 1:
|
2019-09-28 01:54:13 +00:00
|
|
|
* [x] Ban users
|
2019-09-27 21:44:28 +00:00
|
|
|
* [x] ACL servers
|
|
|
|
* [x] Update lists with new bans/ACLs
|
2019-09-26 02:13:20 +00:00
|
|
|
|
|
|
|
Phase 2:
|
2019-10-03 04:20:37 +00:00
|
|
|
* [x] Pantalaimon support
|
2019-10-03 04:24:11 +00:00
|
|
|
* [ ] No-op mode (for verifying behaviour)
|
2019-09-28 02:05:01 +00:00
|
|
|
* [ ] Redact messages on ban (optionally)
|
2019-10-05 02:59:30 +00:00
|
|
|
* [x] More useful spam in management room
|
|
|
|
* [ ] Command to import ACLs, etc from rooms
|
2019-10-05 03:22:34 +00:00
|
|
|
* [x] Vet rooms on startup option
|
2019-09-28 02:10:03 +00:00
|
|
|
* [ ] Command to actually unban users (instead of leaving them stuck)
|
2019-10-08 15:31:06 +00:00
|
|
|
* [ ] Support multiple lists
|
2019-09-28 02:05:01 +00:00
|
|
|
|
|
|
|
Phase 3:
|
|
|
|
* [ ] Synapse antispam module
|
2019-10-05 03:02:37 +00:00
|
|
|
* [ ] Room upgrade handling (both protected+list rooms)
|
2019-09-28 02:05:01 +00:00
|
|
|
* [ ] Support community-defined scopes? (ie: no hardcoded config)
|
|
|
|
* [ ] Riot hooks (independent of mjolnir?)
|
2019-09-26 02:13:20 +00:00
|
|
|
|
|
|
|
## Docker (preferred)
|
|
|
|
|
2019-10-08 15:28:06 +00:00
|
|
|
Mjolnir is on Docker Hub as [matrixdotorg/mjolnir](https://hub.docker.com/r/matrixdotorg/mjolnir)
|
|
|
|
but can be built yourself with `docker build -t mjolnir .`.
|
2019-09-26 02:13:20 +00:00
|
|
|
|
|
|
|
```bash
|
|
|
|
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
|
|
|
|
|
2019-10-08 15:28:06 +00:00
|
|
|
docker run --rm -it -v /etc/mjolnir:/data matrixdotorg/mjolnir:latest
|
2019-09-26 02:13:20 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## Build it
|
|
|
|
|
|
|
|
This bot requires `yarn` and Node 10.
|
|
|
|
|
|
|
|
```bash
|
|
|
|
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.
|