mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-04 09:39:23 +00:00
[#1740] temp workaround to chat duplication
This commit is contained in:
parent
c9776b8857
commit
0d6d20b939
1 changed files with 3 additions and 0 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue