fix: ensure the message types are same when grouping (#10661)

This commit is contained in:
Shivam Mishra
2025-01-10 09:32:06 +05:30
committed by GitHub
parent 2d44468c38
commit 4912140893

View File

@@ -76,6 +76,8 @@ const shouldGroupWithNext = (index, searchList) => {
if (!hasSameSender || areBothTemplates) return false;
if (currentMessageType !== nextMessageType) return false;
// 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);
};