fix: ensure the message types are same when grouping (#10661)
This commit is contained in:
parent
2d44468c38
commit
4912140893
@ -76,6 +76,8 @@ const shouldGroupWithNext = (index, searchList) => {
|
|||||||
|
|
||||||
if (!hasSameSender || areBothTemplates) return false;
|
if (!hasSameSender || areBothTemplates) return false;
|
||||||
|
|
||||||
|
if (currentMessageType !== nextMessageType) 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