Unpack all the ids into { txid32, createdAt } form
Find if there's any posts that have been moderated by mods with txid32 also satisfying createdAt range
Foreach id, return back
{
id, // serialized id
txid32,
createdAt,
tags // tags that the mod has added to this post
}
How does this work on front end?
Each post should be passed to /moderation/postpolicy where multiple posts can be passed at once as well as specifying the mods that user is using.
In the response,
We should introduce another field to Post for tags that were added only as a result of coming from mod-added tags, modTags
We should then also introduce the method isTagged which checks if a tag is present in post.tags or post.modTags where as isModTagged only checks if its present in post.modTags
If isModTagged("modspam") the post is treated as hidden/spam
If isTagged("nsfw") the post is treated as nsfw
Additional notes
Pinned posts can be treated as well as a mod-assigned tag and an additional end point could be used to provide this all pinned posts for a particular tag, given a list of mods.
Supporting NSFW requires a refactor to the mod system --
Retrieve post policies for a group of post
Retrieve posts that are pinned for a given tag
Authenticated endpoint to obtain a list of posts that the user (moderator) has added tags to
Authenticated endpoint to add tags to a post / set additional tags via moderation
How does this work on back end?
Unpack all the ids into { txid32, createdAt } form Find if there's any posts that have been moderated by
mods
with txid32 also satisfying createdAt range Foreach id, return backHow does this work on front end?
Each post should be passed to
/moderation/postpolicy
where multiple posts can be passed at once as well as specifying the mods that user is using. In the response,We should introduce another field to
Post
for tags that were added only as a result of coming from mod-added tags,modTags
We should then also introduce the methodisTagged
which checks if a tag is present inpost.tags
orpost.modTags
where asisModTagged
only checks if its present inpost.modTags
IfisModTagged("modspam")
the post is treated as hidden/spam IfisTagged("nsfw")
the post is treated as nsfwAdditional notes
Pinned posts can be treated as well as a mod-assigned tag and an additional end point could be used to provide this all pinned posts for a particular tag, given a list of mods.