Ensure new message in addCallHistory has all attributes
This commit is contained in:
@@ -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 =
|
||||||
|
Reference in New Issue
Block a user