[#1740] temp workaround to chat duplication

This commit is contained in:
Tyler Renelle 2013-11-03 23:39:09 -08:00
parent c9776b8857
commit 0d6d20b939

View file

@ -210,6 +210,9 @@ api.postChat = function(req, res, next) {
timestamp: +(new Date)
};
// workaround for preventing duplicate chat messages. Real solution is to prevent <ENTER> between sends on the client
if (group.chat[0].uuid == message.uuid && group.chat[0].text == message.text) return res.json(group);
group.chat.unshift(message);
group.chat.splice(200);