feat(moderation): add manual content review system with three-tier AI moderation
Add admin comment moderation endpoints (single and batch) and introduce a three-tier moderation system (pass/review/block) for content flagged by AI. Content with unclear violations is now held for manual review instead of being auto-rejected. Deleted the legacy audit_service.go in favor of the unified hook-based moderation system.
This commit is contained in:
@@ -178,6 +178,10 @@ func (s *postServiceImpl) reviewPostAsync(postID, userID, title, content string,
|
||||
})
|
||||
|
||||
if !result.Approved {
|
||||
if result.NeedsReview {
|
||||
s.invalidatePostCaches(postID)
|
||||
return
|
||||
}
|
||||
if updateErr := s.updateModerationStatusWithRetry(postID, model.PostStatusRejected, result.RejectReason, result.ReviewedBy); updateErr != nil {
|
||||
log.Printf("[WARN] Failed to reject post %s: %v", postID, updateErr)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user