Commit Graph
579 Commits
Author SHA1 Message Date
Gnuxie 88bf0acf5e Add the sender when showing a policy rule change. (#51)
![image](https://github.com/Gnuxie/Draupnir/assets/50846879/1e445d60-d816-4bd1-bec2-c6b4128793d7)

Mainly useful for Community Moderation Effort.
2023-05-10 23:07:32 +01:00
GnuxieandMarco Cirillo 9f43e1186b Incorperate Do not interrupt redact sequences due to error when backfilling (#50)
* Do not interrupt redact sequences due to error when backfilling

... Mainly timeouts.

* Change caught redaction error LogLevel from DEBUG to ERROR.

From matrix-org/mjolnir#479

---------

Co-authored-by: Marco Cirillo <marco.cirillo@aria-net.org>
2023-05-03 16:56:17 +01:00
Gnuxie 99e6f168ca Appservice convenience (#47)
Canonicalise the existence of the "admin room" for managing the appservice and Draupnir instances

* Add utilities for managing users in the admin room

* Merge the appservice admin room and access control list.

The majority of admins will need to use the draupnir admin commands
to manage the list.

* Utility methods for creating generic rules in PolicyLists.

* Commands for managing appservice users.
2023-05-03 16:31:28 +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
dependabot[bot] 4e0e832855 Bump yaml from 2.1.1 to 2.2.2 (#49)
Bumps [yaml](https://github.com/eemeli/yaml) from 2.1.1 to 2.2.2.
- [Release notes](https://github.com/eemeli/yaml/releases)
- [Commits](https://github.com/eemeli/yaml/compare/v2.1.1...v2.2.2)

---
updated-dependencies:
- dependency-name: yaml
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-28 22:30:02 +01:00
Gnuxie 9e8783312a Use matrix-appservice-bridge's PostgreSQL datastore for Draupnir appservice (#46)
* use matrix-appservice-bridge support for postgres

* upgrade matrix-appservice-bridge to include postgres fixes.

These are unreleased and a specific develop commit, but we're the only ones
who have made changes so far to the develop branch,
so should be fine.

* Upgrade matrix-appservice-bridge to 8.1.1.

8.0.1 was never added to npm for some weird reason.
2023-03-31 18:16:23 +01:00
gnuxie d8ef8a94d9 v1.81.4 v1.81.4 2023-03-28 22:01:47 +01:00
gnuxie 2d78cbbee5 Remember to resolve policy lists where we can. 2023-03-28 22:00:50 +01:00
gnuxie 7de96bda34 v1.81.3 v1.81.3 2023-03-28 20:01:27 +01:00
Gnuxie 924bed5813 PolicyListManager watch/unwatch should use MatrixRoomReferences. (#42) 2023-03-28 19:55:34 +01:00
gnuxie 0f8826f810 v1.81.2 v1.81.2 2023-03-28 14:03:00 +01:00
gnuxie 7750773a7f Glue was calling shutdown room rather than deactivate user. 2023-03-28 13:53:58 +01:00
gnuxie 1fbeda0d4c Stop MatrixReactionHandler reacting to itself. 2023-03-24 18:57:25 +00:00
gnuxie 492230d61d Update references to a now non-existant IProtection in tests. 2023-03-24 18:57:25 +00:00
gnuxie 81b0c9a20d Yeah i don't have to spoons for this test matey.
If you're reading this commit and this is the hill you want to die on
for judging Gnuxie then lol go die on it.
2023-03-24 18:57:25 +00:00
gnuxie 1a73492178 Update protectionSettingsTest for Protection changes.
Worried about when IProtection existed and when it was removed??
Idk but this wasn't going great to begin with.
2023-03-24 18:57:25 +00:00
gnuxie 06b3f71c92 Update BanPropagationProtection to use MatrixReactionHandler. 2023-03-24 18:57:25 +00:00
gnuxie f565b010a4 Add MatrixReactionHandler that allows us to create advanced prompts.
These prompts don't have a timeout and don't need a backing store,
so this is ideal for the ban propagation protection.
2023-03-24 18:57:25 +00:00
gnuxie d390ce8772 Allow protections to hook into mjolnir startup. 2023-03-24 18:57:25 +00:00
gnuxie 009ece3281 v1.81.1 v1.81.1 2023-03-16 20:36:41 +00:00
gnuxie ffcc3c6804 Bugfix: !draupnir status was matching against !draupnir joins. 2023-03-14 13:42:59 +00:00
gnuxie a0ffb0d315 Github release action won't sync tags with remote. 2023-03-14 12:53:04 +00:00
gnuxie 9ff1bcf3e1 v1.81.0 v1.81.0 2023-03-14 12:22:54 +00:00
gnuxie 598f5483d9 type guards for updated Permalink helper 2023-03-09 15:20:52 +00:00
gnuxie a960025b61 Add Permalink changes from
https://github.com/turt2live/matrix-bot-sdk/pull/300
Element takes forever reviewing anything so i suspect
it'll be months before Travis even sniffs it.
2023-03-09 15:20:52 +00:00
gnuxie d05db20a49 Improve help for command parameters by listing their descriptions. 2023-03-07 19:59:08 +00:00
gnuxie f122beadef Help page.
TODO:
- Needs description adding into the detail rather than the summary
- needs rich text
- needs markdown detail/summary to not just be the HTML tags, unacceptable since it's supposed to be fallback
- More commands
2023-03-07 19:59:08 +00:00
gnuxie 7d29d68aa2 Add name to CommandTable 2023-03-07 19:59:08 +00:00
gnuxie 7d3f222f2b Add destructuring of command tables for imported tables 2023-03-07 19:59:08 +00:00
gnuxie 1aa97b7c09 Add AliasCommands to Synapse admin table
Not sure whether this will be their home in the long term but
for now it'll do.
2023-03-07 19:59:08 +00:00
gnuxie 1e51aded59 MatrixRoomReference has distinct RoomID and Alias parts. 2023-03-07 19:59:08 +00:00
gnuxie 3f70aa60d0 Migrate Synapse admin commands to a dedicated table.
Still neeed to do alias commands. I think that requires a dedicated
alias and resolved room type and room reference is some kind of union type
that can resolve to a concrete room id.
2023-03-07 19:59:08 +00:00
gnuxie 18b1adbcc4 Allow for commands to be imported from other tables. 2023-03-07 19:59:08 +00:00
gnuxie 4283905b34 I don't like this solution
`details` and `summary` being put into html in markdown is unacceptable
regardless of whether popular implementations support it.
Plain text client will not lol.

What's being asked for is detail/summary on category of commands.
That can only really happen once Synapse admin commands are all grouped
together into one table.
2023-03-07 19:59:08 +00:00
Gnuxie e2c689c668 Add who banned the user to the ban propagation protection. (#37) 2023-03-07 15:08:21 +00:00
Gnuxie 5414c46c36 Ban Propagation protection (that is enabled by default) (#36)
* 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
2023-02-22 16:43:24 +00:00
JokerGermany 00645463c7 Don't recommend uppercase shortcodes, when mjolnir doesn't like them. (#31) 2023-02-21 21:04:28 +00: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
Val Lorentz a83e077fd3 Fix link to Mjolnir 2023-02-20 22:50:13 +00:00
gnuxie 0620bb1db7 Tag information missing when creating version.txt in CI. 2023-02-20 20:10:54 +00:00
gnuxie 64e721d690 v1.80.1 v1.80.1 2023-02-20 20:05:37 +00:00
gnuxie ec83d5625f We added an any presentation type with no subtype semantics...
This broke presentation renderers since `any` doesn't have a renderer
and it would match every presentation type. So anything that needed
rendering would try to be rendered as `any` which sucks.
Not sure what the semantics would be yet but we don't have to worry
for now.
2023-02-20 19:47:26 +00:00
gnuxie 12e124e1a6 Add noImplicitThis to .tsconfig. 2023-02-20 19:47:26 +00:00
gnuxie 8dddf5a390 Ban wasn't using implicit this for finding a matrix client. 2023-02-20 19:47:26 +00:00
Aminda Suomalainen e57834fe1d add .gitattributes & .editorconfig (#25)
The `.gitattributes` configuration requires everything that is detected as text to have `lf` line endings even when checked out.

The [`.editorconfig` configures capable text editors](https://editorconfig.org/#pre-installed) to

* use `lf` line endings
* remove trailing whitespace (with the exception of markdown files where it's valid way to end a paragraph?)
* insert a newline at end of file
* use the utf-8 charset
* use 4 spaces for indenting (instead of tabs)

while within this repository.

Signed-off-by: Aminda Suomalainen
Signed-off-by: Aminda Suomalainen <suomalainen+git@mikaela.info>
2023-02-14 12:19:36 +00:00
gnuxie 5e2a175645 v1.80.0 v1.80.0 2023-02-11 20:57:39 +00:00
gnuxie 88f711b8f4 Update yarn:version to account for pre-releases. 2023-02-11 20:57:35 +00:00
gnuxie 8cad6a6b81 Update project status in README.md. 2023-02-11 20:47:33 +00:00
gnuxie 7178b01dbb Do not touch version.txt if generating the version fails. 2023-02-11 20:16:30 +00:00
gnuxie acc7b59a33 Github actions should generate version.txt. 2023-02-11 15:59:50 +00:00