Re-add messages concatenation

This commit is contained in:
Oswaldo Acauan 2017-04-28 15:01:50 +00:00
parent 3d0c0d38e1
commit 4dd5e3c6ac

View File

@ -82,7 +82,7 @@ const reduceMessages = (previous, current, index, array) => {
// Check if the last message is from the same user and time discrepancy
// between the two messages exceeds window and then group current message
// with the last one
return previous.concat(current);
if (lastPayload.from_userid === currentPayload.from_userid
&& (currentPayload.from_time - lastPayload.from_time) <= GROUPING_MESSAGES_WINDOW) {
lastMessage.content.push(current.content.pop());