Move addCallHistory into conversation queue
This commit is contained in:
parent
59d158f968
commit
efda924589
1 changed files with 45 additions and 38 deletions
|
@ -3246,6 +3246,10 @@ export class ConversationModel extends window.Backbone
|
|||
throw missingCaseError(callHistoryDetails);
|
||||
}
|
||||
|
||||
// This is sometimes called inside of another conversation queue job so if
|
||||
// awaited it would block on this forever.
|
||||
drop(
|
||||
this.queueJob('addCallHistory', async () => {
|
||||
const message = {
|
||||
conversationId: this.id,
|
||||
type: 'call-history',
|
||||
|
@ -3260,7 +3264,8 @@ export class ConversationModel extends window.Backbone
|
|||
} as unknown as MessageAttributesType;
|
||||
|
||||
if (callHistoryDetails.callMode === CallMode.Direct) {
|
||||
const messageId = await window.Signal.Data.getCallHistoryMessageByCallId(
|
||||
const messageId =
|
||||
await window.Signal.Data.getCallHistoryMessageByCallId(
|
||||
this.id,
|
||||
callHistoryDetails.callId
|
||||
);
|
||||
|
@ -3290,6 +3295,8 @@ export class ConversationModel extends window.Backbone
|
|||
if (canConversationBeUnarchived(this.attributes)) {
|
||||
this.setArchived(false);
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue