Commit Graph

68 Commits

Author SHA1 Message Date
Gnuxie
711b9b7413 tidy config properties (#724)
* Remove `syncOnStartup` option since it no longer does anything.

We always 'sync' on startup, not that we have a concept of syncing
anymore. https://github.com/the-draupnir-project/Draupnir/issues/504.

* remove `verboseLogging`.

yeah, cya later pal. https://github.com/the-draupnir-project/Draupnir/issues/504.
2025-02-06 13:43:00 +00:00
Catalan Lover
0d42cd30f4 Cleanup Integration Test Config. (#675) 2025-01-15 19:01:21 +00:00
Catalan Lover
69b666e56d Make Room state backing store be default enabled. (#673)
* Make Room state backing store be default enabled.

* Disable Room State Backing Store for Integration Tests
2025-01-15 19:01:06 +00:00
Catalan Lover
c3552d0c59 Remove confirmWildcardBan config option (#672)
Fixes https://github.com/the-draupnir-project/Draupnir/issues/671
2025-01-15 17:58:11 +00:00
Catalan Lover
731a944a90 Remove Faster membership checks config entry. (#670)
Fixes https://github.com/the-draupnir-project/Draupnir/issues/669
2025-01-15 17:57:41 +00:00
Catalan Lover
b9c12b74d7 Remove Protected Rooms config option (#674) 2025-01-15 17:50:07 +00:00
Catalan Lover
54dd85daf5 Remove References to Regex in Config Example as they are false (#600)
* Remove References to Regex in Config Example as they are false

* Add note that Regex is not supported and state historical error.
2024-10-09 17:01:32 +01:00
gnuxie
d817810be9 Add more detail about safe mode to the config file. 2024-10-02 17:23:34 +01:00
gnuxie
98c1822013 Give some flexibility for when to enter safe mode. 2024-10-02 11:32:04 +01: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
80ccb64330 Implement RoomStateBackingStore with BetterSqlite. 2024-04-06 20:03:38 +01:00
gnuxie
6d28ac81b0 Remove the RuleServer.
It was never used and we don't test it.
We can't really support it.
2024-04-06 20:03:32 +01:00
Gnuxie
945c737df6 Add secret management command line options to documentation. (#247) 2024-02-09 18:39:24 +00:00
Marcel
5738d764d4 Add support for bot-sdk crypto as an experimental flag (#145)
* Add support for bot-sdk crypto as an experimental flag

* Import and use StoreType enum

* Fail hard instead of continuing in case of having pantalaimon and bot-sdk set up

* Document Option in default.yaml

* Remove obsolete comment
2023-10-21 12:18:10 +01:00
Gnuxie
4b656306ed Deprecate config.verboseLogging (#98)
Shouldn't change what is being logged to the log file,
but it does change what gets sent to the management room.
I've been meaning to disable this for some time as it generally
confuses new users and it makes the bot feel very confusing and
low quality. It also means you are likely to miss more important
messages in the magement room.

Another problem it causes is an inconsistent view when testing
the software and it's an unreasonable burden to test for both
settings.

It's not clear what the value of this setting is apart from
providing comfort to some users who want to see the ACL readout.
But even then it's a very inefficient way of doing that,
so i'd rather another feature be requested by users that want to see that.
2023-09-07 15:27:00 +01:00
gnuxie
e8847a2524 Allow Draupnir to ignore m.room.server_acl
https://github.com/Gnuxie/Draupnir/pull/85
2023-09-04 15:25:35 +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
Catalan Lover
e3c33743fc Change all instances of Mjolnir/mjolnir with Draupnir/draupnir. (#35)
Also changes Mjölnir instances to Draupnir.
2023-02-21 21:03:12 +00: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
Gnuxie
c936332442 Ban/Unban rework + Prompts for missing arguments (#12)
* basic ban conversion, but i have better ideas

* Still very WIP on CLIM prompt-for-accept semantics.

* Introduce promotable streams.

This allows parameters to specify details to prompt for missing
arguments
and allow for interactive commands.

* Changes that were made before PolicyListManager that no longer make sense

We don't want the default list anymore since we're just going to prompt
with the lists that they can choose from.

* Fix semantics of TagDynamicEnvironment.

Bind and write were wrong and bind was binding to the node name
instead of the variable name.

* The JSX factory can render presentation types to DocumentNodes, unsure if this is the right
move yet but it works

* Attributes for anchor nodes now render properly

* Ban command prompts are working!!!!

* Stub AppserviceBotEmitter.

There isn't much we can do right now until there is time to work on
https://github.com/Gnuxie/Draupnir/issues/13.

* Combine ban/unban syntax.

* Remove old UnbanBanCommands.

WARNING: There is a major difference in that the ban command no longer supports
globs, I don't think?

* Activate new unban command.

* The presentation type boolean will have to be just a string for now.

I don't think it makes sense to read them into actual booleans.

* configurable defaults for ban reason.
2023-02-08 12:50:23 +00:00
David Teller
2915757b7d Very basic support for Sentry. (#398)
The Sentry package is very useful for monitoring runtime errors. With this PR,
we simply add the necessary mechanism to:

- log to sentry any uncaught error that reaches the toplevel, including startup errors.
2022-11-30 16:06:02 +01:00
Gnuxie
9bcb0b7a59 Replace acceptInvitesFromGroup with acceptInvitesFromSpace. (#338)
Replace acceptInvitesFromGroup with acceptInvitesFromSpace.

https://github.com/matrix-org/mjolnir/issues/125
https://github.com/matrix-org/mjolnir/issues/99

acceptInvitesFromGroup was implemented with an experimental api
that was a precursor to spaces which was refereed to
as either communities or groups.
Support for communities/groups ended in Synapse 1.61.0
https://github.com/matrix-org/synapse/releases/tag/v1.61.0.

To test we just edit the config dynamically which changes how the join room listener functions
though idk, shouldn't we have just made a new mjolnir instance
for this test, or changed the config before the test started somehow?


Co-authored-by: jesopo <github@lolnerd.net>
2022-08-17 10:05:23 +01:00
Jess Porter
b03d81dcc4 ability to disable displaying new reports in moderation room (#320) 2022-07-07 12:55:03 +01:00
Jess Porter
ed68e02c4e implement polling reports in synapse (#259) 2022-07-04 15:06:36 +01:00
David Teller
0eea04bd69 A background queue for kicking (#296)
A background queue for kicking
2022-06-08 11:49:43 +02: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
Marco Cirillo
97df4d5f61 Add command to elevate a user (or the bot) as room administrator (#219) 2022-03-07 10:14:06 +01:00
Graham Christensen
d364d9879a default.yaml: expand on fasterMembershipChecks (#163)
It isn't clear what it means to have the server "struggle" with state requests.

This change is trying to make the configuration more actionable to end users.
2022-02-07 12:41:26 +00:00
gnuxie
afb0fd5a23 Skip policy consumption test when the rule server is not enabled 2022-01-21 12:28:59 +00:00
gnuxie
1a65122b0d Initial Ruleserver prototype.
This is an experimental ruleserver that will serve the combined rules from
the active policy lists to a Synapse module over a web api.
This makes it easier to communicate changes in policy lists to Synapse workers
that do not have an immediate view over all of the policy rooms at
the same time.
This also allows us to express moderation actions to the homeserver
beyond what is currently expressible via MSC2313 policy
lists.
2022-01-21 12:13:04 +00:00
gnuxie
9048322709 Improvements to manual testing with the test:manual script.
- Use the configured username & password when registering the test user to run Mjolnir with (was hardcoded).
- Remove bogus imports from the helper that have accidentally been introduced with VSCode.
- Keep `enable_registration: true` in the homeserver config to save time.
2022-01-21 10:11:01 +00:00
David Teller
06e5f00b2d Intercept /report and display human-readable abuse reports in the moderation room - Resolves #38 (#135)
* Intercept /report and display human-readable abuse reports in the moderation room - Resolves #38
2021-10-07 14:42:08 +02:00
gnuxie
4d46d4dd34 Move integration test config file
it now lives in config/ because it was being loaded there by the tests before it could be copied to there from the test directory
2021-09-30 16:02:58 +01:00
J. Ryan Stinnett
46192ac6f7 Add confirmation for wildcard bans
This adds a default enabled option to require confirmation for wildcard bans
(e.g. those containing `*` or `?`). Users will need to also add `--force` for
the commands to be accepted.
2021-02-05 16:09:11 +00:00
Travis Ralston
afe1c8f5a2 Update config/default.yaml 2020-11-04 12:19:32 -07:00
Travis Ralston
44a15f7851 Corrected whitespace in config.yml 2020-10-31 09:32:49 -04:00
Emi Tatsuo
4c0bbd845d Removed default words from word list in favor of more neutral words 2020-10-31 09:23:18 -04:00
Emi Simpson
c2fbf0934a Added configuration for wordlist protection 2020-06-21 15:18:34 -04:00
Travis Ralston
4751b093a5 Add Healthz support 2020-06-12 08:03:08 -06:00
Travis Ralston
7fa025f678 Remove ban list server support
This will take the shape of something else eventually.
2020-05-11 21:11:24 -06:00
Travis Ralston
6dd59120a7 Revert "Disable ban list server for release"
This reverts commit 1a8edd54f7.
2020-04-15 08:14:24 -06:00
Travis Ralston
1a8edd54f7 Disable ban list server for release 2020-04-15 08:13:57 -06:00
Travis Ralston
06398967c5 Revert "Disable ban list server for release"
This reverts commit ea6c9bd7df.
2020-03-05 15:42:45 -07:00
Travis Ralston
ea6c9bd7df Disable ban list server for release 2020-03-05 15:39:34 -07:00
Travis Ralston
ecc7674422 Add optional reporting of invites that won't be accepted 2020-03-05 15:38:09 -07:00
Travis Ralston
7314df7379 Re-work invite settings to better support practical use cases 2020-03-05 15:29:30 -07:00
Travis Ralston
ba7ea90fcb Don't cause panic if the bot can't protect a ban list it didn't create
This only affects users with `protectAllJoinedRooms` enabled, as the bot can't possibly protect ban lists it did not create itself.
2020-02-18 17:06:27 -07:00
Travis Ralston
1a591b4dcf Revert "Disable ban list server for release"
This reverts commit 3e303219a6.
2020-02-13 23:06:12 -07:00
Travis Ralston
3e303219a6 Disable ban list server for release 2020-02-13 23:04:57 -07:00
Travis Ralston
9e5c87ac56 Add options to specify custom command prefixes
Fixes https://github.com/matrix-org/mjolnir/issues/29
2020-02-12 15:27:27 -07:00