Never mark outgoing call message as unread
This commit is contained in:
parent
6f1d824c3d
commit
9c869148ef
1 changed files with 6 additions and 5 deletions
|
@ -3079,7 +3079,9 @@ export class ConversationModel extends window.Backbone
|
||||||
assertDev(resolvedTime, 'Direct call must have accepted or ended time');
|
assertDev(resolvedTime, 'Direct call must have accepted or ended time');
|
||||||
timestamp = resolvedTime;
|
timestamp = resolvedTime;
|
||||||
unread =
|
unread =
|
||||||
!callHistoryDetails.wasDeclined && !callHistoryDetails.acceptedTime;
|
callHistoryDetails.wasIncoming &&
|
||||||
|
!callHistoryDetails.wasDeclined &&
|
||||||
|
!callHistoryDetails.acceptedTime;
|
||||||
detailsToSave = {
|
detailsToSave = {
|
||||||
...callHistoryDetails,
|
...callHistoryDetails,
|
||||||
callMode: CallMode.Direct,
|
callMode: CallMode.Direct,
|
||||||
|
@ -3100,7 +3102,7 @@ export class ConversationModel extends window.Backbone
|
||||||
this.queueJob('addCallHistory', async () => {
|
this.queueJob('addCallHistory', async () => {
|
||||||
// Force save if we're adding a new call history message for a direct call
|
// Force save if we're adding a new call history message for a direct call
|
||||||
let forceSave = true;
|
let forceSave = true;
|
||||||
let previousMessage: MessageAttributesType | void;
|
let previousMessage: MessageAttributesType | null = null;
|
||||||
if (callHistoryDetails.callMode === CallMode.Direct) {
|
if (callHistoryDetails.callMode === CallMode.Direct) {
|
||||||
const messageId =
|
const messageId =
|
||||||
await window.Signal.Data.getCallHistoryMessageByCallId(
|
await window.Signal.Data.getCallHistoryMessageByCallId(
|
||||||
|
@ -3113,9 +3115,8 @@ export class ConversationModel extends window.Backbone
|
||||||
);
|
);
|
||||||
// We don't want to force save if we're updating an existing message
|
// We don't want to force save if we're updating an existing message
|
||||||
forceSave = false;
|
forceSave = false;
|
||||||
previousMessage = await window.Signal.Data.getMessageById(
|
previousMessage =
|
||||||
messageId
|
(await window.Signal.Data.getMessageById(messageId)) ?? null;
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
log.info(
|
log.info(
|
||||||
`addCallHistory: No existing call history message found (Call ID: ${callHistoryDetails.callId})`
|
`addCallHistory: No existing call history message found (Call ID: ${callHistoryDetails.callId})`
|
||||||
|
|
Loading…
Reference in a new issue