I operate a content mirroring instance that is intended to be read-only, where only a moderator bot is allowed to post and comment. However, I realized that comments can still be made on posts even when the community is set to “Only moderators can post”. Locking threads can block comments but it would also prevent the bot from posting comments, and there are a lot of threads to lock.
My naive solution is currently to ban anyone who comments, but is there any better way to create a read-only community without also blocking federation?
Would setting up another bot to auto delete any comments not made by your mirroring bot fix the problem? You could have the bot also send a PM explaining why their post was deleted.
I consider these features critical on the backend so new server upgrades and hardware moves can be tested without letting users create posts or comments.
Yes, it is possible
There’s a checkbox for that when creating a new community.
On 0.18.0, there is only the “Only moderators can post” checkbox which stops regular users from creating new posts, but it doesn’t stop them from commenting on posts. I’m looking for a way to prevent both (instead of deleting comments after they have been posted).
If your bot is already a moderator of the community couldn’t it lock the comments by default and when it needs to make a comment it could unlock it for that brief moment and relock it.