fix: Fixed typescript build at chat-utils.ts file (#118)

This commit is contained in:
gusta4321
2023-06-15 21:08:51 -03:00
committed by GitHub
parent c657934218
commit 2f438a6539

View File

@@ -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
}
}
}