- disable room discovery by default while we work out how to pipe it into a new room
- show status of takedown protections in the takedown command
- clarify a comment about the implementation of blocking invintations
We really need to figure out how to let protections put all their output into a room.
It is too noisy and i don't think people have time to review it. In a
moment i will try see if i can create a new room for the protection at
startup in a moment.
* Improve room shutdown flows.
- The shutdown command now has a `--notify` option for whether to send
the violation notification.
- We use shutdown V1 because V2 doesn't propagate leave events to clients
properly. Which sucks.
* Fix flakey shutdown test.
So this was never working it was just catching the original message
containing the command by speed of shutdown V2.
Fixes a tonne of shite mare.
Importantly https://github.com/the-draupnir-project/Draupnir/issues/845.
And something @ll-SKY-ll mentioned in the draupnir room regarding the new MentionLimitProtection.
Added
- Quote syntax to quote strings.
- Boolean presentation type and translator to string.
Fixed
- Added a pathway to create negative integers.
- Send a warning message when the event gets removed.
- Ban on the second infraction.
- Make it an option as to whether the message gets split.
- The config file won't work anymore can't fix that because wuh we can't have both as the source of truth........ unless we differentiate based on the timestamp but that requires infrastructure changes.
Homeserver Admin: Restrict resident users automatically based on watched policy rooms
We introduce a new concept "restriction" which basically means "can a user send events from this account". Which is important when purging the messages sent from a user while deactivating their account.
We introduce a new protection, the `HomeserverUserPolicyApplication` protection which suspends users automatically when resident users match a policy from watched policy rooms. If the policy contains a reason for `config.automaticallyRedactForReasons`, then we prompt to do a purging deactivate (redact -> deactivate).
Users are also unsuspended as policies are removed.
We also introduce a `--purge-messages` and `--no-confirm` option to the `deactivate` command. This means that the command can now use the user redaction endpoint to redact messages and will shadowban the user while it does this if their account isn't already restricted. The addition of `--no-confirm` means that we now show a preview every time you run the deactivate command where you can review the user details before confirming the deactivation.
Follow up 1: https://github.com/the-draupnir-project/Draupnir/issues/813
Follow up 2: https://github.com/the-draupnir-project/Draupnir/issues/814
And also do purging deactivation in the background
We introduce "restriction" as a way to refer to an account that has
been suspended or locked or shadowbanned etc.
We also add a UserRestrictionCapability for protections to use the
functionality for suspending users.
We keep an audit log that updates when missing account restrictions
are discovered. (IE those that are prexisting)
The protection that makes these features available is the
HomeserverUserPolicyProtection.
Cat ran into this funny leftover when validating if abuse reporting still works after Cats reworks in mdad. Turns out they do and as it was my first time using these flows Cat discovered this.
Add commands to suspend/unsuspend users via the synapse admin API
- I have no idea how this interacts with MAS
- There is no locking available in the synapse admin API.
- The _Redaction Synchronisation Protection_ has been improved in a few ways:
- Invitations in protected rooms will be rejected as part of the redaction
process when they are sent from users being redacted (e.g. as a brigading
tactic).
- User redaction will now be triggered on bans and the reason will be scanned
for `automaticallyRedactForReasons` from Draupnir's config.
* Update RedactionSynchronisation for new protection apis.
* Rerwrite redaction synchronisation protection
* Reject invitations on ban.
* Add renderer and simulated redaction synchornisation capability.
* Reduce dependencies of redaction synchronisation protection.
* Allow RedactionSynchronisation to be unit tested.
* Update to MPS 3.1.0.
---------
Signed-off-by: Rory& <root@rory.gay>
Co-authored-by: Rory& <root@rory.gay>
* Take room pill out of takedown notice.
* Fix missing configSchema in RoomTakedownProtection.
It was always there... just not plumbed in.
* Fix RoomTakedownConfig schema was wrong.
Properties that default to undefined need to be optional because of
the way defaulting works.
* Fix missing name on RoomTakedownProtectionSettings.
* Fix joined_members missing from RoomBasicDetails.
Important because it's used for the threshold.
* Improve rendering of room discovery.
* Add SimulatedRoomTakedownCapability.
https://github.com/the-draupnir-project/planning/issues/41#issuecomment-2755447714
* Change renderer to include protection name.
For some reason addOneLiner does this but addMessage does not?
Something to look into there mare...