fix(HH-576): normalize realtime message timestamps (#148)
Co-authored-by: Rogee <rogee@ipao.vip>
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user