fix: Message grouping logic (#10656)

This commit is contained in:
Shivam Mishra 2025-01-09 13:24:16 +05:30 committed by GitHub
parent b5f4e8155b
commit ef01779d61
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -74,7 +74,7 @@ const shouldGroupWithNext = (index, searchList) => {
nextMessageType === 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
return Math.floor(next.createdAt / 60) === Math.floor(current.createdAt / 60);