We no longer want to accept an argument for the list. We will just
find all appropriate policies and remove them, like we do with the
unban prompt (which we still might want to update to use the new
`--no-confirm` prompt later).
We fix the bugs where the unban command was inviting users regardless
of whether the `--invite` option was provided.
The unban command now uses a preview which shows all the policies that
will have to be removed to unban a user, all the rooms they will need
to be unbanned from, and any rooms that they will be invited to if the
`--invite` option is used.
We split out some utility types from the matrix-protection-suite into a library https://github.com/the-draupnir-project/matrix-basic-types
I can't believe that like the extra lines from
```
import {
} from ...
```
are adding up so much but whatever.
* Move to @the-draupnir-project/basic-matrix-types.
* Whoopsie missed a test.
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.
* Migrate to eslint-9 strictTypeChecked & typescript 5.
* Update to MPS 0.23.0.
Required for strict type checks.
* Looks like we found a test that was complete garbage, amazing really.
* FIXUP
* Well, the command handler was bugged previously...
The command handler used to always only return the command
without the prefix due to an operator precedence bug.
This meant that when we made the order of operations explicit,
we were now including the prefix of the command in the copy.
So when we parsed arguments the code wasn't expecting the prefix
to be there.
* update to MPS 0.23.1.
MPS 0.23.0 was bugged because we didn't enable
`noUncheckedIndexedAccess` while upgrading to typescript 5.
* Make sure eslint runs on all ts files.
* eslint fixes.
* enable `noUncheckedIndexedAccess` & `exactOptionalPropertyTypes`.
* eslint ignores is clearly not understood by me.
* Update SuperCoolStream for eslint and ts5.
* stricter eslint done i thinks
* Whoops, added on .only somewhere.
* Update MPS.
* fix broken test realted things.
* Well I guess that part of getMessagesByUserIn was part of the interface.
* Fix redactionCommandTest.
* Account for escapeHTML in tests.
* Fix tests.
* stuff not matching with .editorconfig fixes.
* Fix appservice webAPI test.
* Update for MPS 0.23.3.
* Experimental Protection to propagate room level bans to policies.
- Needs an automated option
- I really want this to be enabled by default
- It needs to be easily configurable and very visible because it's a really useful feature.
- Need to check that they are not already banned on a policy list.
- Allow possibility to rely last message like a report behind spoiler text.
* Use MatrixDataManager for enabled protections.
This will allow us to create "enabled by default" protections
via a schema migration.
* Enable BanPropagationProtection by default
* BanPropagation: only prompt when user is not already banned.
* Test for BanPropagationProtection.
* clearTimeout for prompt reactions if we got a reaction.
* Allow renderMatrixAndSend to not need a reply.
* document getFirstEventMatching
* Refactor Matrix event listener in Mjolnir and ManagedMjolnir.
closes https://github.com/matrix-org/mjolnir/issues/411.
Issue #411 says that we have to be careful about room.join,
but this was before we figured how to make matrix-appservice-bridge
echo events sent by its own intents.
* Remove MatrixClientListener since it isn't actually needed.
* Protect which config values can be used for ManagedMjolnirs.
* Introduce MatrixSendClient
so listeners aren't accidentally added to a MatrixClient instead
of MatrixEmitter.
* doc
* Move provisioned mjolnir config to src/config.
This just aids maintance so whenever someone goes to change the config
of the bot they will see this and update it.
* doc for matrix intent listener.
Specifically `onReactionTo` was starting and stopping the client
argument it was given, which could be problematic if the caller
didn't expect that or didn't want it to.