fix: Message grouping logic (#10656)
This commit is contained in:
parent
b5f4e8155b
commit
ef01779d61
@ -74,7 +74,7 @@ const shouldGroupWithNext = (index, searchList) => {
|
|||||||
nextMessageType === MESSAGE_TYPES.TEMPLATE &&
|
nextMessageType === MESSAGE_TYPES.TEMPLATE &&
|
||||||
currentMessageType === MESSAGE_TYPES.TEMPLATE;
|
currentMessageType === MESSAGE_TYPES.TEMPLATE;
|
||||||
|
|
||||||
if (!hasSameSender || !areBothTemplates) return false;
|
if (!hasSameSender || areBothTemplates) return false;
|
||||||
|
|
||||||
// Check if messages are in the same minute by rounding down to nearest minute
|
// Check if messages are in the same minute by rounding down to nearest minute
|
||||||
return Math.floor(next.createdAt / 60) === Math.floor(current.createdAt / 60);
|
return Math.floor(next.createdAt / 60) === Math.floor(current.createdAt / 60);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user