@@ -6,166 +6,178 @@ SPDX-License-Identifier: CC-BY-SA-4.0
66
77# Draupnir
88
9- A [ Matrix] ( https://matrix.org ) moderation bot and protection platform.
10- Visit [ #draupnir: matrix .org] ( https://matrix.to/#/#draupnir:matrix.org )
11- in your client and come say hi.
9+ A [ Matrix] ( https://matrix.org ) moderation bot and protection platform. Visit
10+ [ #draupnir: matrix .org] ( https://matrix.to/#/#draupnir:matrix.org ) in your client
11+ and come say hi.
1212
13- Please see the [ draupnir
14- documentation] ( https://the-draupnir-project.github.io/draupnir-documentation/ )
13+ Please see the
14+ [ draupnir documentation] ( https://the-draupnir-project.github.io/draupnir-documentation/ )
1515for installation instructions and usage guides.
1616
1717## Features
1818
19- Draupnir has two main functions, the first is to synchronise bans for
20- users and servers across all of the matrix rooms that you moderate.
21- The second is to protect your community by applying policies from community curated
22- policy lists, for example the [ community moderation effort] ( https://matrix.to/#/#community-moderation-effort-bl:neko.dev ) ,
23- to your rooms around the clock. This means that communities can warn
24- and protect each other of known threats.
19+ Draupnir has two main functions, the first is to synchronise bans for users and
20+ servers across all of the matrix rooms that you moderate. The second is to
21+ protect your community by applying policies from community curated policy lists,
22+ for example the
23+ [ community moderation effort] ( https://matrix.to/#/#community-moderation-effort-bl:neko.dev ) ,
24+ to your rooms around the clock. This means that communities can warn and protect
25+ each other of known threats.
2526
26- Draupnir also includes a series of protections that can be enabled
27- that might help you in some scenarios.
27+ Draupnir also includes a series of protections that can be enabled that might
28+ help you in some scenarios.
2829
29- By default Draupnir includes support for user bans, redactions and
30- server ACLs.
30+ By default Draupnir includes support for user bans, redactions and server ACLs.
3131
32- Some support is also provided for server administrative functions,
33- such as reviewing abuse reports, deactivating user accounts and
34- shutting down rooms.
32+ Some support is also provided for server administrative functions, such as
33+ reviewing abuse reports, deactivating user accounts and shutting down rooms.
3534
3635### Differences from Mjolnir
3736
3837> I offer you the ring, which was burned, laid upon the pyre of Baldr by Odin.
3938
4039Draupnir started as a fork of [ Mjolnir] ( https://github.com/matrix-org/mjolnir ) ,
4140in order to radically refactor the code base and break a feature freeze.
42- Draupnir has now completed this refactor and large sections of the the
43- code base are now very distinct, as much of Draupnir was rewritten.
41+ Draupnir has now completed this refactor and large sections of the the code base
42+ are now very distinct, as much of Draupnir was rewritten.
4443
45- Draupnir remains a drop in replacement for Mjolnir and is forwards and
46- backwards compatible.
44+ Draupnir remains a drop in replacement for Mjolnir and is forwards and backwards
45+ compatible.
4746
4847#### Changes in ` v2.0.0-beta.* ` (pre-release)
4948
50- - Draupnir's new core efficiently caches room state and room
51- membership allowing Draupnir to be much more responsive than
52- Mjolnir.
49+ - Draupnir's new core efficiently caches room state and room membership allowing
50+ Draupnir to be much more responsive than Mjolnir.
5351
54- - Draupnir is much less dependant on commands
55- and will automatically send prompts to the management room.
56- Prompts are sent for inviting Draupnir to protect rooms,
57- watch policy lists, ban users, and unban users.
52+ - Draupnir is much less dependant on commands and will automatically send
53+ prompts to the management room. Prompts are sent for inviting Draupnir to
54+ protect rooms, watch policy lists, ban users, and unban users.
5855
59- - Draupnir offers a [ room state backing
60- store] ( https://github.com/the-draupnir-project/Draupnir/blob/main/config/default.yaml#L206-L212 ) ,
61- allowing Draupnir startup quickly, even when deployed at distance
62- from the homeserver.
56+ - Draupnir offers a
57+ [ room state backing store] ( https://github.com/the-draupnir-project/Draupnir/blob/main/config/default.yaml#L206-L212 ) ,
58+ allowing Draupnir startup quickly, even when deployed at distance from the
59+ homeserver.
6360
64- - Draupnir's core functionality is implemented as protections,
65- which can be dynamically turned on and off.
61+ - Draupnir's core functionality is implemented as protections, which can be
62+ dynamically turned on and off.
6663
67- - Most effort has been spent refactoring the code base, paving the way
68- for future feature development and adjacent projects. This includes
69- the rewrite of the core of Draupnir into the
64+ - Most effort has been spent refactoring the code base, paving the way for
65+ future feature development and adjacent projects. This includes the rewrite of
66+ the core of Draupnir into the
7067 [ matrix-protection-suite] ( https://github.com/Gnuxie/matrix-protection-suite ) ,
71- providing all the Matrix client code required to operate a
72- protection platform. The
68+ providing all the Matrix client code required to operate a protection
69+ platform. The
7370 [ interface-manager] ( https://github.com/the-draupnir-project/interface-manager )
74- providing an advanced command-oriented interface (note, this does
75- not mean command-line interface). The
71+ providing an advanced command-oriented interface (note, this does not mean
72+ command-line interface). The
7673 [ matrix-basic-types] ( https://github.com/the-draupnir-project/matrix-basic-types )
77- library for dealing with Matrix's various string types. And finally
78- the introduction of [ prettier] ( https://prettier.io/ ) ,
74+ library for dealing with Matrix's various string types. And finally the
75+ introduction of [ prettier] ( https://prettier.io/ ) ,
7976 [ eslint] ( https://eslint.org/ ) and
80- [ typescript-eslint] ( https://typescript-eslint.io/ ) into Draupnir's
81- development tooling, modernising TypeScript development.
77+ [ typescript-eslint] ( https://typescript-eslint.io/ ) into Draupnir's development
78+ tooling, modernising TypeScript development.
8279
8380#### Changes in latest ` v1.87.0 `
8481
8582The main difference from Mjolnir is that it is no longer necessary to use
86- commands for some functions. Banning a user in a protected room from your
87- Matrix client will cause Draupnir to show a prompt in the management room,
88- which will offer to add the ban to a policy list[ ^ the-gif-width ] .
83+ commands for some functions. Banning a user in a protected room from your Matrix
84+ client will cause Draupnir to show a prompt in the management room, which will
85+ offer to add the ban to a policy list[ ^ the-gif-width ] .
8986
9087![ A demo showing a propagation prompt] ( docs/ban-propagation-prompt.gif )
9188
92- You can also unban users the same way, and Draupnir will prompt you
93- to unban them without any confusing hiccups.
94- If you do still wish to use the ban command, please note that users
95- and other entities that are being banned are now the first argument
96- to the ban command. It is now also possible to provide only the entity to
97- Draupnir and have Draupnir prompt you for the policy list and the ban reason.
89+ You can also unban users the same way, and Draupnir will prompt you to unban
90+ them without any confusing hiccups. If you do still wish to use the ban command,
91+ please note that users and other entities that are being banned are now the
92+ first argument to the ban command. It is now also possible to provide only the
93+ entity to Draupnir and have Draupnir prompt you for the policy list and the ban
94+ reason.
9895
9996![ A demo showing the ban command] ( docs/ban-command-prompt.gif )
10097
101- In general, all commands have been migrated to a new interface which
102- feature better error messages for common problems and allow admins
103- to trace the cause of unexpected errors much more easily.
98+ In general, all commands have been migrated to a new interface which feature
99+ better error messages for common problems and allow admins to trace the cause of
100+ unexpected errors much more easily.
104101
105102[ ^ the-gif-width ] :
106- Yes, i know they don't align horizontally,
107- you are welcome to suggest how this should be fixed.
103+ Yes, i know they don't align horizontally, you are welcome to suggest how
104+ this should be fixed.
108105
109106## Status
110107
111- Draupnir is being supported with a grant from NLnet,
112- the goals of the work are described [ here] ( https://marewolf.me/posts/draupnir/24-nlnet-goals.html )
108+ Draupnir is being supported with a grant from NLnet, the goals of the work are
109+ described [ here] ( https://marewolf.me/posts/draupnir/24-nlnet-goals.html )
113110
114- Currently The UX and code base of Draupnir has been overhauled and
115- Draupnir is moving towards a 2.0.0 release.
111+ Currently The UX and code base of Draupnir has been overhauled and Draupnir is
112+ moving towards a 2.0.0 release.
116113
117- As Draupnir heads towards ` v2.0.0 ` , releases will appear [ here] ( https://github.com/Gnuxie/Draupnir/releases ) .
118- Until ` v2.0.0 ` there will be frequent changes to commands but all of these
119- will be noted in the changes for that release.
114+ As Draupnir heads towards ` v2.0.0 ` , releases will appear
115+ [ here] ( https://github.com/Gnuxie/Draupnir/releases ) . Until ` v2.0.0 ` there will
116+ be frequent changes to commands but all of these will be noted in the changes
117+ for that release.
120118
121- Currently, we are running a beta channel (` v2.0.0-beta.* ` ). As of now
122- all functionality apart from dynamic configuration of protection
123- settings is stable in the beta channel.
119+ Currently, we are running a beta channel (` v2.0.0-beta.* ` ). As of now all
120+ functionality apart from dynamic configuration of protection settings is stable
121+ in the beta channel.
124122
125- For the latest stable release, see ` v1.87.0 ` , the documentation
126- for which can be found [ here] ( https://github.com/the-draupnir-project/Draupnir/tree/v1.87.0 ) .
123+ For the latest stable release, see ` v1.87.0 ` , the documentation for which can be
124+ found [ here] ( https://github.com/the-draupnir-project/Draupnir/tree/v1.87.0 ) .
127125
128126### Migration
129127
130128Migrating from Mjolnir is straightforward and requires no manual steps,
131129migration for your setup is likely as simple as changing your server config to
132- pull the latest Draupnir docker image instead of a mjolnir one.
133- Draupnir remains backwards compatible so that it is possible to try Draupnir
134- and still have the option to switch back to Mjolnir.
130+ pull the latest Draupnir docker image instead of a mjolnir one. Draupnir remains
131+ backwards compatible so that it is possible to try Draupnir and still have the
132+ option to switch back to Mjolnir.
135133
136- Any problems with migration should be reported to our [ support room] ( https://matrix.to/#/#draupnir:matrix.org ) .
134+ Any problems with migration should be reported to our
135+ [ support room] ( https://matrix.to/#/#draupnir:matrix.org ) .
137136
138137## Setting up
139138
140- See the [ setup documentation] ( https://the-draupnir-project.github.io/draupnir-documentation/bot/setup ) for first-time setup documentation.
139+ See the
140+ [ setup documentation] ( https://the-draupnir-project.github.io/draupnir-documentation/bot/setup )
141+ for first-time setup documentation.
141142
142- See the [ configuration sample with documentation] ( config/default.yaml ) for detailed information about Draupnir's configuration.
143+ See the [ configuration sample with documentation] ( config/default.yaml ) for
144+ detailed information about Draupnir's configuration.
143145
144- See the [ synapse module documentation] ( docs/synapse_module.md ) for information on how to setup Draupnir's accompanying Synapse Module.
146+ See the [ synapse module documentation] ( docs/synapse_module.md ) for information
147+ on how to setup Draupnir's accompanying Synapse Module.
145148
146149## Quickstart guide
147150
148- After your bot is up and running, you'll want to run a couple commands to get everything
149- set up:
151+ After your bot is up and running, you'll want to run a couple commands to get
152+ everything set up:
150153
151- 1 . ` !draupnir list create my-coc code-of-conduct-ban-list ` - This will create a new ban list
152- with the shortcode ` my-coc ` and an alias of ` #code-of-conduct-ban-list:example.org ` . You
153- will be invited to the room it creates automatically where you can change settings such
154- as the visibility of the room.
155- 2 . Review the [ Moderator's Guide] ( https://the-draupnir-project.github.io/draupnir-documentation/moderator/setting-up-and-configuring ) .
154+ 1 . ` !draupnir list create my-coc code-of-conduct-ban-list ` - This will create a
155+ new ban list with the shortcode ` my-coc ` and an alias of
156+ ` #code-of-conduct-ban-list:example.org ` . You will be invited to the room it
157+ creates automatically where you can change settings such as the visibility of
158+ the room.
159+ 2 . Review the
160+ [ Moderator's Guide] ( https://the-draupnir-project.github.io/draupnir-documentation/moderator/setting-up-and-configuring ) .
1561613 . Review ` !draupnir help ` to see what else the bot can do.
157162
158163## Enabling readable abuse reports
159164
160- Since version 1.2, Draupnir offers the ability to replace the Matrix endpoint used
161- to report abuse and display it into a room, instead of requiring you to request
162- this data from an admin API.
165+ Since version 1.2, Draupnir offers the ability to replace the Matrix endpoint
166+ used to report abuse and display it into a room, instead of requiring you to
167+ request this data from an admin API.
163168
164169This requires two configuration steps:
165170
166- 1 . In your Draupnir configuration file, typically ` /etc/draupnir/config/production.yaml ` , copy and paste the ` web ` section from ` default.yaml ` , if you don't have it yet (it appears with version 1.20) and set ` enabled: true ` for both ` web ` and
167- ` abuseReporting ` .
168- 2 . Setup a reverse proxy that will redirect requests from ` ^/_matrix/client/(r0|v3)/rooms/([^/]*)/report/(.*)$ ` to ` http://host:port/api/1/report/$2/$3 ` , where ` host ` is the host where you run Draupnir, and ` port ` is the port you configured in ` production.yaml ` . For an example nginx configuration, see ` test/nginx.conf ` . It's the confirmation we use during runtime testing.
171+ 1 . In your Draupnir configuration file, typically
172+ ` /etc/draupnir/config/production.yaml ` , copy and paste the ` web ` section from
173+ ` default.yaml ` , if you don't have it yet (it appears with version 1.20) and
174+ set ` enabled: true ` for both ` web ` and ` abuseReporting ` .
175+ 2 . Setup a reverse proxy that will redirect requests from
176+ ` ^/_matrix/client/(r0|v3)/rooms/([^/]*)/report/(.*)$ ` to
177+ ` http://host:port/api/1/report/$2/$3 ` , where ` host ` is the host where you run
178+ Draupnir, and ` port ` is the port you configured in ` production.yaml ` . For an
179+ example nginx configuration, see ` test/nginx.conf ` . It's the confirmation we
180+ use during runtime testing.
169181
170182### Security note
171183
@@ -181,16 +193,17 @@ this feature will publish information from room _foo_ is:
181193Essentially, this is a more restricted variant of the Admin APIs available on
182194homeservers.
183195
184- However, if you are uncomfortable with this, please do not activate this feature.
185- Also, you should probably setup your ` production.yaml ` to ensure that the web
186- server can only receive requests from your reverse proxy (e.g. ` localhost ` ).
196+ However, if you are uncomfortable with this, please do not activate this
197+ feature. Also, you should probably setup your ` production.yaml ` to ensure that
198+ the web server can only receive requests from your reverse proxy (e.g.
199+ ` localhost ` ).
187200
188201## Contributing & Opening Issues
189202
190- Draupnir wants to be yours as much as it is ours.
191- Please see or [ contributing document] ( https://the-draupnir-project.github.io/draupnir-documentation/contributing ) , but do not
192- worry too much about following the guidance to the letter. And
193- keep that in mind throughout.
203+ Draupnir wants to be yours as much as it is ours. Please see or
204+ [ contributing document] ( https://the-draupnir-project.github.io/draupnir-documentation/contributing ) ,
205+ but do not worry too much about following the guidance to the letter. And keep
206+ that in mind throughout.
194207
195208## Supported by
196209
0 commit comments