Message.sendSyncMessage: properly handle falsey id field

This commit is contained in:
Scott Nonnenberg
2021-07-20 17:29:44 -07:00
committed by GitHub
parent 6893bbec64
commit e94eaf07a9

View File

@@ -1851,7 +1851,9 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
isUpdate, isUpdate,
options: sendOptions, options: sendOptions,
}), }),
{ messageIds: [this.id], sendType: 'sentSync' } // Note: in some situations, for doNotSave messages, the message has no
// id, so we provide an empty array here.
{ messageIds: this.id ? [this.id] : [], sendType: 'sentSync' }
).then(async result => { ).then(async result => {
let newSendStateByConversationId: undefined | SendStateByConversationId; let newSendStateByConversationId: undefined | SendStateByConversationId;
const sendStateByConversationId = const sendStateByConversationId =