the-draupnir-project / Draupnir

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

Move from`org.matrix.mjolnir.protected_rooms` to spaces. #397

Open Gnuxie opened 2 months ago

Gnuxie commented 2 months ago

When reworking Draupnir's documentation, quite early in the setup phase a new user will reach the point where they need to mark all their existing rooms as protected. Currently the only way to do this is by spamming !draupnir rooms add, creating a script to dump the room list into config.protectedRooms, or using a script to set the account data manually. There is also https://mru.rory.gay/Moderation/DraupnirProtectedRoomsEditor maintained by @TheArcaneBrony.

Originally, we wanted to migrate to a room state event so editors and clients could edit the list of protected rooms more easily, but i think this is a mistake since it is unlikely that any client will support the workflow for adding and removing rooms from it, and singing into a specialist tool is a major friction point for new users.

It makes sense to instead piggy back off of a space, Matrix's specified way of organizing a group of rooms. For most users, they will already have a space and just sharing the url of it to Draupnir will help a lot.

I don't know yet whether the account data should be migrated to a space or we just add space support into the an extended me.marewolf.draupnir.protected_rooms that also support spaces. The drawback will be that rooms can be duplicated in the rooms field and those protected implicitly via the spaces field. Though maybe we could include some warnings about when that happens and some UI to help debug it (the describes how each room ended up being protected).