Ensure left pane has correct timestamp for call

This commit is contained in:
Scott Nonnenberg 2024-05-28 15:13:09 +10:00 committed by GitHub
parent ad9dcb34f4
commit 06f71a7ef8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 62 additions and 29 deletions

View file

@ -165,6 +165,7 @@ import OS from '../util/os/osMain';
import { getMessageAuthorText } from '../util/getMessageAuthorText';
import { downscaleOutgoingAttachment } from '../util/attachments';
import { MessageRequestResponseEvent } from '../types/MessageRequestResponseEvent';
import { getCallHistorySelector } from '../state/selectors/callHistory';
/* eslint-disable more/no-then */
window.Whisper = window.Whisper || {};
@ -4190,7 +4191,13 @@ export class ConversationModel extends window.Backbone
let lastMessageReceivedAt = this.get('lastMessageReceivedAt');
let lastMessageReceivedAtMs = this.get('lastMessageReceivedAtMs');
if (activityMessage) {
const callId = activityMessage.get('callId');
const callHistory = callId
? getCallHistorySelector(window.reduxStore.getState())(callId)
: undefined;
timestamp =
callHistory?.timestamp ||
activityMessage.get('editMessageTimestamp') ||
activityMessage.get('sent_at') ||
timestamp;