Ensure new message in addCallHistory has all attributes
This commit is contained in:
parent
f84b6a31dc
commit
fd8bd54de5
1 changed files with 4 additions and 3 deletions
|
@ -3284,18 +3284,19 @@ export class ConversationModel extends window.Backbone
|
||||||
// awaited it would block on this forever.
|
// awaited it would block on this forever.
|
||||||
drop(
|
drop(
|
||||||
this.queueJob('addCallHistory', async () => {
|
this.queueJob('addCallHistory', async () => {
|
||||||
const message = {
|
const message: MessageAttributesType = {
|
||||||
|
id: generateGuid(),
|
||||||
conversationId: this.id,
|
conversationId: this.id,
|
||||||
type: 'call-history',
|
type: 'call-history',
|
||||||
sent_at: timestamp,
|
sent_at: timestamp,
|
||||||
|
timestamp,
|
||||||
received_at:
|
received_at:
|
||||||
receivedAtCounter || window.Signal.Util.incrementMessageCounter(),
|
receivedAtCounter || window.Signal.Util.incrementMessageCounter(),
|
||||||
received_at_ms: timestamp,
|
received_at_ms: timestamp,
|
||||||
readStatus: unread ? ReadStatus.Unread : ReadStatus.Read,
|
readStatus: unread ? ReadStatus.Unread : ReadStatus.Read,
|
||||||
seenStatus: unread ? SeenStatus.Unseen : SeenStatus.NotApplicable,
|
seenStatus: unread ? SeenStatus.Unseen : SeenStatus.NotApplicable,
|
||||||
callHistoryDetails: detailsToSave,
|
callHistoryDetails: detailsToSave,
|
||||||
// TODO: DESKTOP-722
|
};
|
||||||
} as unknown as MessageAttributesType;
|
|
||||||
|
|
||||||
if (callHistoryDetails.callMode === CallMode.Direct) {
|
if (callHistoryDetails.callMode === CallMode.Direct) {
|
||||||
const messageId =
|
const messageId =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue