matrix-org / mjolnir

A moderation tool for Matrix
Apache License 2.0
330 stars 56 forks source link

We need to decide how to check that a mjolnir owner still has access to the appservice #410

Open Gnuxie opened 2 years ago

Gnuxie commented 2 years ago

Do we only check when the appservice is restarted? probably not. Do we need to check each time they use the web api? probably. Do we need to check each time they send a command to one of their mjolnirs? Probably.

We need to work out the API for these checks in a way that means programmers won't clumsily refactor them out, so it probably has to be implicit to every use of the mjolnir manager.

https://github.com/matrix-org/mjolnir/blob/818e4cf3153015591b5175d584f542df10e7951b/src/appservice/MjolnirManager.ts#L154-L174

Gnuxie commented 2 years ago

Alternately and more simply we can just watch for the ACL to change and then remove the user then