Skip to content

Commit

Permalink
Skip double save with sync message that has errors
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanHahn-Signal committed Jun 28, 2021
1 parent 4495a1a commit a3315bc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ts/models/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit a3315bc

Please sign in to comment.