mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Boss damage messages translation support
This commit is contained in:
@@ -74,7 +74,7 @@ api.getChat = {
|
||||
let group = await Group.getGroup({user, groupId: req.params.groupId, fields: 'chat'});
|
||||
if (!group) throw new NotFound(res.t('groupNotFound'));
|
||||
|
||||
res.respond(200, Group.toJSONCleanChat(group, user).chat);
|
||||
res.respond(200, await Group.toJSONCleanChat(group, user).chat);
|
||||
},
|
||||
};
|
||||
|
||||
@@ -194,7 +194,7 @@ api.postChat = {
|
||||
}
|
||||
|
||||
if (chatUpdated) {
|
||||
res.respond(200, {chat: Group.toJSONCleanChat(savedGroup, user).chat});
|
||||
res.respond(200, {chat: await Group.toJSONCleanChat(savedGroup, user).chat});
|
||||
} else {
|
||||
res.respond(200, {message: savedGroup.chat[0]});
|
||||
}
|
||||
@@ -486,7 +486,7 @@ api.deleteChat = {
|
||||
).exec();
|
||||
|
||||
if (chatUpdated) {
|
||||
let chatRes = Group.toJSONCleanChat(group, user).chat;
|
||||
let chatRes = await Group.toJSONCleanChat(group, user).chat;
|
||||
removeFromArray(chatRes, {id: chatId});
|
||||
res.respond(200, chatRes);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user