fix(HH-576): normalize realtime message timestamps (#148)

Co-authored-by: Rogee <rogee@ipao.vip>
This commit is contained in:
Rogee
2026-08-24 10:16:22 +08:00
committed by GitHub
co-authored by rogee
parent 83e2a8ead6
commit b981cc6811
5 changed files with 202 additions and 7 deletions
@@ -19,6 +19,7 @@ import {
handleVoiceCallUpdated,
syncConversationCallVisibility,
} from 'dashboard/helper/voice';
import { isNewerTimestamp } from 'shared/helpers/timeHelper';
export const hasMessageFailedWithExternalError = pendingMessage => {
// This helper is used to check if the message has failed with an external error.
@@ -41,9 +42,7 @@ const getStoredMessage = (conversation, message) => {
};
const isNewerMessage = (currentMessage, message) =>
!currentMessage?.updated_at ||
!message.updated_at ||
message.updated_at > currentMessage.updated_at;
isNewerTimestamp(currentMessage?.updated_at, message.updated_at);
// actions
const actions = {