mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
feat: Allow admins to flag messages in private groups
This commit is contained in:
@@ -182,7 +182,11 @@ api.flagChat = {
|
||||
let validationErrors = req.validationErrors();
|
||||
if (validationErrors) throw validationErrors;
|
||||
|
||||
let group = await Group.getGroup({user, groupId});
|
||||
let group = await Group.getGroup({
|
||||
user,
|
||||
groupId,
|
||||
optionalMembership: user.contributor.admin,
|
||||
});
|
||||
if (!group) throw new NotFound(res.t('groupNotFound'));
|
||||
let message = _.find(group.chat, {id: req.params.chatId});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user