Commit Graph

34 Commits

Author SHA1 Message Date
Aminda Suomalainen
f9a7bb8c03 prettier: enable prose wrapping
Squashed commit of the following:

commit 0af76a8670
Author: Aminda Suomalainen <suomalainen@aminda.eu>
Date:   Tue Oct 8 16:30:17 2024 +0300

    mx-tester.yml: run prettier to fix warning

commit 0eb6901797
Author: Aminda Suomalainen <suomalainen@aminda.eu>
Date:   Tue Oct 8 16:29:05 2024 +0300

    *.md: run prettier

commit d18ebd52fe
Author: Aminda Suomalainen <suomalainen@aminda.eu>
Date:   Tue Oct 8 16:25:27 2024 +0300

    .prettierrc.yaml: add proseWrap: always
2024-10-08 16:43:52 +03:00
Gnuxie
337a6a3b76 Add reuse.software (#486)
We have a lot of verbose headers, and i think now is the best opportunity we have to become reuse compliant given that we just did two other similar maintenance changes (prettier, typescirpt5 & eslint9 & typescript-eslint).

* synapse_antispam resuse headers.

* delete old unused tslint.json.

* Add REUSE to pre-commit config.

* reuse info for config directory.
2024-07-25 10:58:40 +01:00
gnuxie
7d4009cf1a Update documentation links for new base url.
Context is that we had `docs` as part of the base URL, fixed in https://github.com/the-draupnir-project/draupnir-documentation/pull/13.
2024-05-24 15:40:16 +01:00
Catalan Lover
86dcbdc41a Move Synapse module to new website (#391)
* Migrate Synapse module to new docs

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-05-04 21:03:42 +01:00
Catalan Lover
34a6a53af8 Documentation Website Move (#387)
* Documentation Website Move

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-05-04 17:10:30 +01:00
Gnuxie
6d4622969f contributing documentation overhaul. (#344)
* contributing documentation overhaul.

* hm

* declutter development stuff from readme.

* hmm

* broken link
2024-04-15 17:50:05 +01:00
Catalan Lover
e583f62aa2 Update AS Docs to mention your AS has to be able to write policies. (#299)
Cat discovered this flaw in the docs when Cat managed to run into #297.
2024-03-20 23:04:04 +00:00
Catalan Lover
5474f75c57 Update D4A Documentation to be A LOT better. (#272)
* Update D4A Documentation and add Config Example For Child Bots

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Move AS Inherited config into Docs instead of having example file.

* Integrate Review Feedback.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix spelling mistake and a few its vs it´s style cases.

* Integrate Second Round of Review Feedback

* Update docs/appservice.md

yeah just wack it in Cat

Co-authored-by: Catalan Lover <48515417+FSG-Cat@users.noreply.github.com>

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Gnuxie <50846879+Gnuxie@users.noreply.github.com>
2024-03-18 12:03:31 +00:00
Catalan Lover
099bcbaf64 Update Docs to mention mdad as a installation method. (#248) 2024-02-10 00:20:25 +00:00
Gnuxie
945c737df6 Add secret management command line options to documentation. (#247) 2024-02-09 18:39:24 +00:00
Catalan Lover
bc0f0ea6f3 Change self references from Gnuxie/Draupnir to the-draupnir-project/Draupnir (#208) 2024-01-15 23:39:57 +00:00
Aminda Suomalainen
56e03e9ccb Fix markdown trailing whitespace & exlude .svg from trailing-whitespace checks (#148)
* .pre-commit-config.yaml: properly handle markdown and exclude svg from trailing-whitespace

* {CONTRIBUTING,docs/appservice}.md: remove trailing whitespace
2023-10-21 12:18:52 +01:00
gnuxie
68e68c434c Add gif showing ban command prompts. 2023-09-14 16:48:51 +01:00
gnuxie
29a8bec086 Bring various documentation up to date with current events. 2023-09-04 20:44:11 +01:00
Aminda Suomalainen
e4c02b96cd Add pre-commit configuration (#34)
* add .pre-commit-config.yaml

Signed-off-by: Aminda Suomalainen <suomalainen+git@mikaela.info>

* .editorconfig: decrease indent size for text

* .pre-commit-config.yaml: remove prettier

Signed-off-by: Aminda Suomalainen <suomalainen+git@mikaela.info>

* .editorconfig consistency.

* .pre-commit-config.yaml: restore sample hooks

* .editorconfig: disable indent_size for LICENSE & NOTICE

* pre-commit run --all-files

* tsconfig.json: tabs to spaces

* .pre-commit-config.yaml: update editorconfig-checker to 2.7.2

* .editorconfig: disable indent_size for markdown

* mjolnir-entrypoint.sh: retab

* .editorconfig: also exclude json from indent checking

* test/nginx.conf: retab

* test/integration/commands/redactCommandTest.ts: remove leading space

* retab or remove leading whitespaces for the rest of the files

* src/appservice/datastore.ts remove newlines

* test/integration/commands/roomTest.ts: remove leading space.

---------

Signed-off-by: Aminda Suomalainen <suomalainen+git@mikaela.info>
Co-authored-by: gnuxie <Gnuxie@protonmail.com>
2023-08-29 13:38:00 +01:00
Marcel
39e2b50c13 Add a missing dash to the docker command in the appservice documentation (#61) 2023-08-22 17:40:37 +01:00
gnuxie
74312e43f6 Update to node 18.
End of life was moved forwards by 7 months so we don't have a choice.
https://nodejs.org/en/blog/announcements/nodejs16-eol.
2023-05-10 19:57:17 +01:00
Gnuxie
449e48b486 Detail about important Draupnir concepts and context. (#48)
* Detail about important Draupnir concepts and context.

Stuff that is essential to understand if there's any hope of
maintaining this shit.

* Notes about the ban command.

* link to context in CONTRIBUTING.
2023-05-03 16:25:41 +01:00
gnuxie
4f1781e31b Rename the bot from Mjolnir to Draupnir in the documentation
Following through with this everywhere will take a lot of time.
2023-02-08 15:04:42 +00:00
Børlaag
f52f17e381 docs: fix small typo in moderators.md (#439)
Signed-off-by: Børlaag <borlaag@proton.me>

Signed-off-by: Børlaag <borlaag@proton.me>
2022-11-28 09:45:37 +00:00
Gnuxie
333c55e18c Config fixes (#432)
* Use the npm package `config` to load the config.

This is what was used prior to https://github.com/matrix-org/mjolnir/pull/347.
It was a nice idea motivated to drop a dependency that was confusing.
It was just never followed through and was underestimated how much disruption it would cause.
It was also believed that the library would mean there could only ever be one global copy of the config,
It was followed up by:
https://github.com/matrix-org/mjolnir/pull/369
https://github.com/matrix-org/mjolnir/pull/357
https://github.com/matrix-org/mjolnir/pull/429
https://github.com/matrix-org/mjolnir/pull/397/files
https://github.com/matrix-org/mjolnir/issues/365

For simplicity sake I am reinstating the library.
The practice of loading default.yaml by default is also dangerous
and has led to issues multiple times in #mjolnir:matrix.org.
It is a sample and not a default.

In a following commit I will be adding the ability to specify the
config to use from the cli.

* Allow config to be specified with an explicit cli argument.

* Update doc to transition away from old config handling
2022-11-23 10:55:22 +00:00
Gnuxie
85cb0f0215 Update selfbuld docs to no longer require on old behaviour. (#429)
The package we used to load config in the past, `node-config`, would
default to `development`.
f54b419900/lib/config.js (L561)
https://github.com/matrix-org/mjolnir/pull/347
2022-11-22 10:38:04 +00:00
Jess Porter
50f80f2392 manymjolnir appservice (#364)
Mjolnir can now be run as an application service,
meaning it will host multiple independent mjolnirs that can be requested by users.
If the user is on the same homeserver as the appservice is deployed on,
then they can provision a mjolnir via a widget https://github.com/matrix-org/mjolnir-widget.
Otherwise they can invite the appservice bot to a room they want to protect.
This will create them a mjolnir, a management room and a policy list.

The appservice shares the same docker image as the bot,
but is started slightly differently by specifying "appservice"
as the first argument to docker run (this s managed by `mjolnir-entrypoint.sh`. 
We could have used another Dockerfile for the appservice,
extending the existing one but we decided not to because there
would have been lots of fiddling around the entrypoint
and logistics involved around adding a tag for it via github actions.
Not to mention that this would be duplicating the image
just to run it with a different binary.

A list of followup issues can be found here https://github.com/issues?q=is%3Aopen+is%3Aissue+author%3AGnuxie+archived%3Afalse+label%3AA-Appservice.

Somewhat relevant and squashed commit messages(regrettably squashing because frankly these won't make sense in isolation): 

* draft widget backend

* add `managementRoomId` to `provisionNewMjolnir`

* remove ratelimits from appservice mjolnirs

* add /join endpoint to api backend


* tighter guard around room type in PolicyList

matrix-bot-sdk imporved the types for this

* enable esModuleInterop

* launch and use postgres in a container whilst using mx-tester


* limited access control

policy list used for access control

* Redesign initialization API of many mjolnir.

It's much harder to forget to initialize the components now that you have to in order to construct them in the first place.


* Ammend config not to clash with existing CI

this means that the appsrvice bot is now called 'mjolnir-bot' by default
which was easier than going through old code base and renaming


* Change entrypoint in Dockerfile so that we can start the appservice.

We could have used another Dockerfile for the appservice,
extending the exising one but we decided not to because there
would have been lots of fiddling around the entrypoint
and logistics involved around adding a tag for it via github actions.
Not to mention that this would be duplicating the image
just to run it with a different binary.

This solution is much simpler, backwards compatible, and conscious about the future.


Co-authored-by: gnuxie <gnuxie@element.io>
2022-11-15 18:03:06 +00:00
mahdi1234
938b9fea8f Fixed typo (#389) 2022-10-18 13:45:57 +01:00
Erik Johnston
a2d919b57a Fix example to have correct incantation (#358) 2022-08-18 11:25:07 +01:00
Jess Porter
eb2c25da7b docs/moderators.md: add section on Trusted Reporters (#332)
* docs/moderators.md: add section on Trusted Reporters

* Update docs/moderators.md

Co-authored-by: Thibault Martin <thibaultamartin@users.noreply.github.com>

* clarify that alertThreshold is not the same as displayReports

Co-authored-by: Thibault Martin <thibaultamartin@users.noreply.github.com>
2022-07-13 13:22:18 +01:00
Gnuxie
84ffb36494 Bump minimum node version to 16. (#316)
* Bump minimum node version to 16.

We already made the mistake of using features from 16 without realising
Previously: https://github.com/matrix-org/mjolnir/pull/192

* Make sure CI uses specific version of node and we also lint.

https://github.com/matrix-org/pipelines/blob/master/mjolnir/pipeline.yml#L13
2022-07-06 14:50:33 +01:00
Jonathan de Jong
bf7f1318af Improve documentation (#277)
* improve documentation

* incorperate documentation of configuration into sample file
2022-05-20 12:19:26 +01:00
Travis Ralston
3bbea09bb3 Update moderators.md 2020-09-12 23:55:21 -06:00
David Baker
9812eef7f4 Update moderators.md 2020-04-03 18:13:37 +01:00
David Baker
26b5ae301c Update moderators.md 2020-04-03 18:10:28 +01:00
Travis Ralston
38e22ee155 Add commands to add/remove protected rooms on the fly 2020-01-21 13:46:15 -07:00
Travis Ralston
2e3bc5287c Update moderation guide for protections 2019-12-06 00:40:24 -07:00
Travis Ralston
12a3d6255d Add a moderator's guide to Mjolnir
Fixes https://github.com/matrix-org/mjolnir/issues/6
2019-10-28 20:20:47 -06:00