From 2930aa002ad8a25c3217675b9af56731dceca31a Mon Sep 17 00:00:00 2001 From: Josh Perez <60019601+josh-signal@users.noreply.github.com> Date: Fri, 30 Jun 2023 10:04:19 -0400 Subject: [PATCH] Fixes message clustering when there is an edit between --- ts/util/timelineUtil.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ts/util/timelineUtil.ts b/ts/util/timelineUtil.ts index 24e0f6541..e0834bbef 100644 --- a/ts/util/timelineUtil.ts +++ b/ts/util/timelineUtil.ts @@ -125,7 +125,8 @@ export function areMessagesInSameGroup( return Boolean( !olderMessage.reactions?.length && olderMessage.author.id === newerMessage.author.id && - newerMessage.timestamp >= olderMessage.timestamp && + (olderMessage.isEditedMessage || + newerMessage.timestamp >= olderMessage.timestamp) && newerMessage.timestamp - olderMessage.timestamp < COLLAPSE_WITHIN && isSameDay(olderMessage.timestamp, newerMessage.timestamp) );