Commit Graph

16 Commits

Author SHA1 Message Date
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 33011ddb04 Store BanList rules only in the room state cache.
We do this so that there is only one source of truth for which rules
are active and it simplifies de-duplicating rules of conflicting event
types (e.g. m.room.rule.user vs m.policy.rule.user).
2021-11-29 11:45:22 +00:00
gnuxie 0bbfe93a4b Use MSC2313 m.policy.rule.* for rules and always prefer these types.
The reason for doing this is because otherwise there may be duplicate
rules under different state types for the same entity.
This simplifies the process of modifying or invalidating rules affecting
an entity because the rule with the most recent type will always be
preferred.
2021-11-29 11:45:22 +00:00
gnuxie 9c47fc917a Provide notice showing how a BanList has changed after updating.
Only shows changes to lists made by other accounts (than the one used by Mjolnir).
Displays when rules are added, removed and modified by either replacing the state event or redacting them.
2021-11-29 11:45:22 +00:00
David Teller 2e22154870 Lint: Enabling 'strictNullChecks' 2021-07-22 08:40:29 +02:00
David Teller 2a77509f9e Lint: Enabling 'noImplicitReturns' 2021-07-22 08:24:12 +02:00
Travis Ralston ff4cbc018f Update matrix-bot-sdk and use request cleaning function 2021-07-01 15:11:27 -06:00
Travis Ralston fa6a6547ee Add very basic subscription server for Synapse module 2020-01-25 20:34:15 -07:00
Travis Ralston fd2343dd28 Add some null safety to ban lists 2019-12-04 19:28:31 -07:00
Travis Ralston 4f8b55c45f Update matrix-bot-sdk 2019-12-04 18:46:00 -07:00
Travis Ralston 82214c6cd8 Avoid spamming the management room with errors
The intervals are arbitrarily defined.

Fixes https://github.com/matrix-org/mjolnir/issues/10
2019-11-06 19:17:11 -07:00
Travis Ralston eccbac9ccf Check if ACLs match before applying them
Fixes https://github.com/matrix-org/mjolnir/issues/9
2019-10-30 14:49:59 -06:00
Travis Ralston aecc6e4882 Support multiple ban lists 2019-10-08 17:57:03 +01:00
Travis Ralston 149cbcfbd2 Remove unused function from ban lists 2019-09-27 19:54:07 -06:00
Travis Ralston 39b59dbee1 Add commands for managing a personal ban list 2019-09-27 15:44:28 -06:00
Travis Ralston d32ad18f3a Update server ACLs when they change 2019-09-27 14:26:57 -06:00