this post was submitted on 22 Jun 2023
583 points (99.5% liked)

Fediverse

28493 readers
642 users here now

A community to talk about the Fediverse and all it's related services using ActivityPub (Mastodon, Lemmy, KBin, etc).

If you wanted to get help with moderating your own community then head over to [email protected]!

Rules

Learn more at these websites: Join The Fediverse Wiki, Fediverse.info, Wikipedia Page, The Federation Info (Stats), FediDB (Stats), Sub Rehab (Reddit Migration), Search Lemmy

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] pnpbios 4 points 1 year ago

I think there should be a middleware layer for posts and comments, where you can write a number of custom routines.

func onNewPost( (user, post, commitFn, rejectFn) => {
   if( user.karma < 100) {rejectFn("Not enough karma to post here.")}
   if( post.length < 100) {rejectFn("Post is too short.")}
   commitFn(user, post);
});