From 861ba36c6f7a982d1a643777a33a9e4050fbfdc5 Mon Sep 17 00:00:00 2001 From: Job Dufitumukiza Date: Thu, 19 Sep 2024 21:16:32 +0300 Subject: [PATCH] refactored the code from line 83-93 in the filesrc/messaging/data.js --- src/messaging/data.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/messaging/data.js b/src/messaging/data.js index 9a07327ff6..c89776ca11 100644 --- a/src/messaging/data.js +++ b/src/messaging/data.js @@ -86,7 +86,7 @@ module.exports = function (Messaging) { // Also check if the previous message was a new set, in which case we don't add a spacer // Also check if the previous message was a system message, in which case we don't add a spacer // Also check if the previous message was a new set, in which case we don't add a spacer - if (message.timestamp > messages[index - 1].timestamp + Messaging.newMessageCutoff() || + if (message.timestamp > messages[index - 1].timestamp + Messaging.newMessageCutoff || message.fromUid !== messages[index - 1].fromUid || messages[index - 1].system) { message.newSet = true;