From d8a758052b96ad3e058c8e4c18a34a5f7b7c51fa Mon Sep 17 00:00:00 2001 From: Maksim Sukharev Date: Wed, 11 Oct 2023 18:00:43 +0200 Subject: [PATCH] fix message grouping with locale-independent comparison method Signed-off-by: Maksim Sukharev --- src/components/MessagesList/MessagesList.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/MessagesList/MessagesList.vue b/src/components/MessagesList/MessagesList.vue index 22de8c86ac7..f5404843a7c 100644 --- a/src/components/MessagesList/MessagesList.vue +++ b/src/components/MessagesList/MessagesList.vue @@ -421,8 +421,8 @@ export default { return false } - // Only group messages within a short period of time, so unrelated messages are not grouped together - return (this.getDateOfMessage(message1).format('X') - this.getDateOfMessage(message2).format('X')) < 300 + // Only group messages within a short period of time (5 minutes), so unrelated messages are not grouped together + return this.getDateOfMessage(message1).diff(this.getDateOfMessage(message2)) < 300 * 1000 }, /**