fix(chat): correctly hide flag counts from non-moderators

This commit is contained in:
SabreCat 2023-02-02 09:02:05 -06:00
parent 3470382528
commit 96a8c1a41c

View file

@ -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;