Re-add messages concatenation
This commit is contained in:
parent
3d0c0d38e1
commit
4dd5e3c6ac
@ -82,7 +82,7 @@ const reduceMessages = (previous, current, index, array) => {
|
|||||||
// Check if the last message is from the same user and time discrepancy
|
// Check if the last message is from the same user and time discrepancy
|
||||||
// between the two messages exceeds window and then group current message
|
// between the two messages exceeds window and then group current message
|
||||||
// with the last one
|
// with the last one
|
||||||
return previous.concat(current);
|
|
||||||
if (lastPayload.from_userid === currentPayload.from_userid
|
if (lastPayload.from_userid === currentPayload.from_userid
|
||||||
&& (currentPayload.from_time - lastPayload.from_time) <= GROUPING_MESSAGES_WINDOW) {
|
&& (currentPayload.from_time - lastPayload.from_time) <= GROUPING_MESSAGES_WINDOW) {
|
||||||
lastMessage.content.push(current.content.pop());
|
lastMessage.content.push(current.content.pop());
|
||||||
|
Loading…
Reference in New Issue
Block a user