Ensure new message in addCallHistory has all attributes

This commit is contained in:
Jamie Kyle 2023-03-16 09:51:41 -07:00 committed by GitHub
parent f84b6a31dc
commit fd8bd54de5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3284,18 +3284,19 @@ export class ConversationModel extends window.Backbone
// awaited it would block on this forever.
drop(
this.queueJob('addCallHistory', async () => {
const message = {
const message: MessageAttributesType = {
id: generateGuid(),
conversationId: this.id,
type: 'call-history',
sent_at: timestamp,
timestamp,
received_at:
receivedAtCounter || window.Signal.Util.incrementMessageCounter(),
received_at_ms: timestamp,
readStatus: unread ? ReadStatus.Unread : ReadStatus.Read,
seenStatus: unread ? SeenStatus.Unseen : SeenStatus.NotApplicable,
callHistoryDetails: detailsToSave,
// TODO: DESKTOP-722
} as unknown as MessageAttributesType;
};
if (callHistoryDetails.callMode === CallMode.Direct) {
const messageId =