Skip double save with sync message that has errors

This commit is contained in:
Evan Hahn
2021-06-28 18:04:42 -05:00
committed by GitHub
parent 4495a1ac67
commit a3315bcb68

View File

@@ -1742,7 +1742,8 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
});
} catch (result) {
const errors = (result && result.errors) || [new Error('Unknown error')];
this.saveErrors(errors);
// We don't save because we're about to save below.
this.saveErrors(errors, { skipSave: true });
} finally {
await window.Signal.Data.saveMessage(this.attributes, {
Message: window.Whisper.Message,