Reactions: Don't apply to messages with errors

This commit is contained in:
Scott Nonnenberg 2020-10-12 10:11:41 -07:00 committed by Josh Perez
parent 5e2a1410e7
commit e8664213d3

View file

@ -3359,6 +3359,15 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
return; return;
} }
// We allow you to react to messages with outgoing errors only if it has sent
// successfully to at least one person.
if (
this.hasErrors() &&
(this.isIncoming() || this.getMessagePropStatus() !== 'partial-sent')
) {
return;
}
const reactions = this.get('reactions') || []; const reactions = this.get('reactions') || [];
const messageId = this.idForLogging(); const messageId = this.idForLogging();
const count = reactions.length; const count = reactions.length;