Skip to content

policyeval/commands: Automatically offer to protect space children - #74

Open
timedoutuk wants to merge 3 commits into
mainfrom
timedoutuk/protect-space
Open

policyeval/commands: Automatically offer to protect space children#74
timedoutuk wants to merge 3 commits into
mainfrom
timedoutuk/protect-space

Conversation

@timedoutuk

Copy link
Copy Markdown
Collaborator

Closes #30

When a space is discovered via !protect, the hierarchy will be inspected to list up to 100 unprotected rooms. The bot will then offer to protect those rooms through the reaction menu.

This implicitly allows "spidering" a space, as when a subspace is protected through these buttons, it will trigger the same child protection menu.

The other option I considered while designing this was a --recursive flag, which would make Meowlnir walk the hierarchy entirely and automatically protect any room it could join and had power level in, however I figured that might be too naive of an algorithm and explicit is better.

Either way, this solves the issue I had where each of our rooms had to be manually protected after upgrading every single room and space in the community. It might be a bit hacky but 🤷‍♀️

Checklist

@timedoutuk
timedoutuk requested a review from tulir August 26, 2026 04:57
@spaetz

spaetz commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Does it make sense to only protect rooms that also claim that space as canoncical parent via m.space.parent? Or is protecting a bunch of rooms that I collected in a non-canonical space actually quite useful? Unsure what's best, just wanted to throw that aspect into consideration.

@timedoutuk

Copy link
Copy Markdown
Collaborator Author

There's no way to know if the space is canonical for the child without first joining the child, which means that detection would be spotty at best (i.e. requires the server is already in the room and it is world readable, or simply requires auto-joining every room in the space pre-emptively). Since the protection isn't done automatically (only offered), and instead requires manual button pushing, I assume people will only protect rooms they actually want to protect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature req: Protect a space

2 participants