From 2f438a65394e92a0187083bf7cab0384a75f3691 Mon Sep 17 00:00:00 2001 From: gusta4321 <61188779+gusta4321@users.noreply.github.com> Date: Thu, 15 Jun 2023 21:08:51 -0300 Subject: [PATCH] fix: Fixed typescript build at chat-utils.ts file (#118) --- src/Utils/chat-utils.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Utils/chat-utils.ts b/src/Utils/chat-utils.ts index 99765e2..b6668b8 100644 --- a/src/Utils/chat-utils.ts +++ b/src/Utils/chat-utils.ts @@ -840,8 +840,8 @@ export const processSyncAction = ( } function isValidPatchBasedOnMessageRange(chat: Chat, msgRange: proto.SyncActionValue.ISyncActionMessageRange | null | undefined) { - const lastMsgTimestamp = msgRange?.lastMessageTimestamp || msgRange?.lastSystemMessageTimestamp || 0 - const chatLastMsgTimestamp = chat?.lastMessageRecvTimestamp || 0 - return lastMsgTimestamp >= chatLastMsgTimestamp + const lastMsgTimestamp = Number(msgRange?.lastMessageTimestamp || msgRange?.lastSystemMessageTimestamp || 0) + const chatLastMsgTimestamp = Number(chat?.lastMessageRecvTimestamp || 0) + return lastMsgTimestamp >= chatLastMsgTimestamp } -} \ No newline at end of file +}