Ensure authorUuid is set in outgoing quotes

This commit is contained in:
Scott Nonnenberg 2020-11-06 11:06:21 -08:00 committed by GitHub
parent 3468de255d
commit d4d9688447
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 39 additions and 19 deletions

View file

@ -2521,6 +2521,10 @@ export class ConversationModel extends window.Backbone.Model<
// sending functionality. It will not be saved to the datbase.
const message = new window.Whisper.Message(attributes);
// This is to ensure that the functions in send() and sendSyncMessage() don't save
// anything to the database.
message.doNotSave = true;
// We're offline!
if (!window.textsecure.messaging) {
throw new Error('Cannot send reaction while offline!');
@ -2579,10 +2583,6 @@ export class ConversationModel extends window.Backbone.Model<
);
})();
// This is to ensure that the functions in send() and sendSyncMessage() don't save
// anything to the database.
message.doNotSave = true;
return message.send(this.wrapSend(promise));
}).catch(error => {
window.log.error('Error sending reaction', reaction, target, error);