Commit Graph
410 Commits
Author SHA1 Message Date
gnuxie 072ee49e31 Update Rules command for MPS. 2024-04-06 20:03:33 +01:00
gnuxie 0d39ab3b99 Update rooms commands to MPS. 2024-04-06 20:03:33 +01:00
gnuxie 2fd2745dc3 Update ManagementRoomOutput for MPS. 2024-04-06 20:03:33 +01:00
gnuxie 87c09d8719 Correctly configure package.json for MPS.
This has taken forever to get working, but now it is.
index.ts is changed because that's how we know
we've overriden the bot-sdk dep correctly.
2024-04-06 20:03:33 +01:00
gnuxie f1d98b579a Port joinOnInvite listener from Mjolnir to Draupnir. 2024-04-06 20:03:33 +01:00
gnuxie fc163edb3e Remove status command from protections for now.
We will replace them with protection specific command tables later.
2024-04-06 20:03:33 +01:00
gnuxie e710f99286 Update BasicFlooding protection for protection settings changes. 2024-04-06 20:03:33 +01:00
gnuxie 03ed39dd69 Refactor TrustedReporters for MPS. 2024-04-06 20:03:33 +01:00
gnuxie 342ef16be6 Consequences are now replaced by MPS consequence providers. 2024-04-06 20:03:33 +01:00
gnuxie 4b415410a9 Remove detect federation lag command.
This is a pretty bold piece of work and it's a shame to remove it for
now.
We would like to bring it back, possibly as a protection.
However, there isn't the time while we move over to the new MPS backend.
2024-04-06 20:03:33 +01:00
gnuxie 11dc0506f2 Remove sync command.
It no longer makes sense to have a sync command since
all synchornisation is done by protections.
So it might come back just not in its current form.
2024-04-06 20:03:33 +01:00
gnuxie 34133f6e8c Remove since command
Much like the joins command, this needs rewriting to use
`SetMembership` from MPS and there isn't the time to do that
right now.
These commands didn't seem to work as intended anyway.
2024-04-06 20:03:33 +01:00
gnuxie a9bde39a0a Remove default banlist command.
In reality this sets a default shortcode,
and for the moment we aren't able to work with shortcodes.

I don't know if it makes sense to bring this command back
in future because we would like to instead have
the ban propagation protection have a setting
for a list to fill client bans directly into.
2024-04-06 20:03:33 +01:00
gnuxie cb942365b3 Remove JoinsCommand.
There isn't the time to make this work at the moment.
It should be brought back later and made to use the `SetMembership`
component from MPS.
2024-04-06 20:03:33 +01:00
gnuxie a370f0f4b4 Begin moving protections over to MPS protections. 2024-04-06 20:03:33 +01:00
gnuxie 89bede86c3 Begin moving most commands to interface-manager and MPS. 2024-04-06 20:03:33 +01:00
gnuxie 67b4c31cce Move resolve command other to interface-manager and MPS. 2024-04-06 20:03:33 +01:00
gnuxie 6fb0584260 Move kick command over to interface-manager and MPS. 2024-04-06 20:03:33 +01:00
gnuxie 4d054f4345 Begin moving all commands over to interface-manager and MPS. 2024-04-06 20:03:33 +01:00
gnuxie 8fbec62df7 Command Context should have MatrixSendClient. 2024-04-06 20:03:33 +01:00
gnuxie f6771b06cf Add MatrixEventReference to presentation types. 2024-04-06 20:03:33 +01:00
gnuxie 76a58b6f00 Delete directory management commands.
This should be managed from the client, and the idea
that being a Synapse admin makes a difference is unfounded.
It wasn't even connected to the command handler anyway.
2024-04-06 20:03:33 +01:00
gnuxie 844751a5b3 Add SynapseAdminClient from MPS4BotSDK to Draupnir. 2024-04-06 20:03:33 +01:00
gnuxie 68bfd61ccf Update all of InterfaceManager to use MPS. 2024-04-06 20:03:33 +01:00
gnuxie 98f3471ea0 Update CommandReader to use MPS. 2024-04-06 20:03:33 +01:00
gnuxie 928d9e3fc5 Delete InterfaceManager components that can be sourced from MPS. 2024-04-06 20:03:33 +01:00
gnuxie 388eaf6bb1 Update BanPropagationProtection to be an MPS protection. 2024-04-06 20:03:33 +01:00
gnuxie e1d009bd69 Update RoomUpdateError to refer to MPS. 2024-04-06 20:03:33 +01:00
gnuxie 89f2b52580 Add consequence for unbanning user (MPS). 2024-04-06 20:03:33 +01:00
gnuxie ecd6dbef71 Update Draupnir for new protection context in mps. 2024-04-06 20:03:33 +01:00
gnuxie 7a5aafde7d Update ReportPoller to use Draupnir (mps). 2024-04-06 20:03:32 +01:00
gnuxie e5e771aaea Update ReportPoller to use Draupnir (mps). 2024-04-06 20:03:32 +01:00
gnuxie 977c4a39de Update ReportManager to use Draupnir (mps). 2024-04-06 20:03:32 +01:00
gnuxie b51566000a Integrate report poller into new Draupnir class. 2024-04-06 20:03:32 +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 2d3b4d1e09 Begin implementing matrix-protection-suite support.
We could really do with some prettier for these newfiles.
2024-04-06 20:03:32 +01:00
gnuxie c3bdf2c74a Unfinished listeners from Mjolnir 2024-04-06 20:03:32 +01:00
gnuxie 67adb530bc Start cleaning up Mjolnir into Draupnir, starting with listeners. 2024-04-06 20:03:32 +01:00
gnuxie 2929266c37 bs 2024-04-06 20:03:32 +01:00
MTRNordandGnuxie 76de8b770b Provision with Draupnir in mxid instead of mjolnir. 2024-02-28 22:12:54 +00:00
gnuxieandGnuxie d36ffff109 Fix d4all restart command. 2024-02-28 22:12:54 +00:00
gnuxieandGnuxie 84f45952ec Rename moderation bot to draupnir-moderation.
Figure this would be a thing that makes more sense to invite.
2024-02-28 22:12:54 +00:00
GnuxieandGitHub 8d0d3213be Set disableStores: true in matrix-appservice-bridge BridgeOpts. (#270)
This stores create database files all over the cwd that use nedb
which shouldn't really be used by the appservice library at this
point.

These files are problematic because they are undocumented to
server admins trying to setup the appservice, and need to be
explicitly accounted for to make permissions work.

The stores enable something called the `BridgeContext` to be
given alongside the event within the `onEvent` handler.
Which we don't use, and it's unclear how it should be used.

The primary motivation for removing the stores is to simplify
work making the appservice available to matrix-docker-ansible-deploy.

We expect to have follow up prs to improve documentation.
2024-02-28 19:14:51 +00:00
Rory&GitHubpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
561cd96488 Read secrets from command line provided paths, if specified (#242)
This provides two new arguments for paths to load secretes for `--access-token-path` and `--pantalaimon-password-path` from.
The intention being that they can be used with a credentials system such as https://systemd.io/CREDENTIALS/.
They will take precedence over anything within the config file.
Suggested after https://github.com/NixOS/nixpkgs/pull/274052#discussion_r1481633083.


---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-02-09 17:20:24 +00:00
GnuxieandGitHub eceea6f21c Stop processing redaction queue before bans. (#230)
Introduced in
https://github.com/the-draupnir-project/Draupnir/commit/ea49b0a5363861b3729dcc720ff091b2480c4165.
Quite easy to see how.
Future redaction work should unit test for this.
This can be done quite easily by using a setTimeout, and non hackily
if you can make the fake request to ban a user resolve only
when an item in the redaction queue has been processed.

Fixes https://github.com/the-draupnir-project/Draupnir/issues/210.
Follow up https://github.com/the-draupnir-project/Draupnir/231
2024-02-01 12:05:32 +00:00
MarcelandGitHub 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
GnuxieandGitHub 69b7209739 Fix RoomUpdateError roomId argument typo (#123)
We were clearly in the process of deleting the
member decleration to just have the decleration be in the constructor.

When we were distracted, leaving a property named `readonly`, which
shouldn't be possible imo, need to add some rule for that prompto.
2023-09-12 11:57:50 +01:00
GnuxieandGitHub 26468afcde Only CommandExceptions should log at creation. (#99)
Before CommandError's where and they are used
liberally for validating command arguments by
returning a CommandResult for several possible
options. Which gives a lot of spam. It's not necessary
anyways since these should only be used for known errors.
2023-09-07 15:59:20 +01:00
GnuxieandGitHub 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
gnuxieandGnuxie 9d841697b2 Rework RoomUpdateErrors to be CommandErrors or CommandExceptions
https://github.com/Gnuxie/Draupnir/pull/93/
2023-09-05 19:53:02 +01:00