diff --git a/src/controllers/groups.js b/src/controllers/groups.js index fddc77ae51..8632d6e48d 100644 --- a/src/controllers/groups.js +++ b/src/controllers/groups.js @@ -261,7 +261,7 @@ api.deleteChatMessage = function(req, res){ Group.update({_id:group._id}, {$pull:{chat:{id: req.params.messageId}}}, function(err){ if(err) return res.json(500, {err: err}); - + return chatUpdated ? res.json({chat: group.chat}) : res.send(204); }); }