fix(chat): correctly hide flag counts from non-moderators
This commit is contained in:
@@ -403,6 +403,7 @@ schema.statics.toJSONCleanChat = async function groupToJSONCleanChat (group, use
|
||||
if (user._id !== chatMsg.uuid && chatMsg.flagCount >= CHAT_FLAG_LIMIT_FOR_HIDING) {
|
||||
return undefined;
|
||||
}
|
||||
chatMsg.flagCount = 0;
|
||||
}
|
||||
|
||||
return chatMsg;
|
||||
|
||||
Reference in New Issue
Block a user