the-draupnir-project / Draupnir

A Matrix moderation bot
https://the-draupnir-project.github.io/draupnir-documentation/
91 stars 14 forks source link

Ability to prevent writing of/rewrite rules by pattern #537

Open TheArcaneBrony opened 2 months ago

TheArcaneBrony commented 2 months ago

Story: I want to avoid writing rules to banlists that match a given pattern. It happens from time to time that a moderator writes a rule for a bridged user without wildcarding the domain, so i'd like to prevent or rewrite rules matching .eg @telegram_12345:myserver.xyz to @telegram_12345:*

Gnuxie commented 2 months ago

Maybe it would make more sense to have an issue for banning bridged users?

TheArcaneBrony commented 3 weeks ago

I'm not sure how you'd reliably detect those?

Gnuxie commented 3 weeks ago

The same way that you're doing here?

TheArcaneBrony commented 3 weeks ago

I had a basic configurable glob/regex thing in mind

Gnuxie commented 3 weeks ago

The point is that the glob/regex is the way to ban them, it's not the ban of a bridged user itself. If you want to record that then we need something else.

So like idk how telegram works but we could have something like this:

me.marewolf.draupnir.rule.telegram_user { "entity": "<their-telegram-id>" }

Then the glob rule can be derived from that