From e8664213d3c770712cd1eae76f6ffa07af17b545 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Mon, 12 Oct 2020 10:11:41 -0700 Subject: [PATCH] Reactions: Don't apply to messages with errors --- ts/models/messages.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ts/models/messages.ts b/ts/models/messages.ts index 77de98cc4281..e588e4d31be2 100644 --- a/ts/models/messages.ts +++ b/ts/models/messages.ts @@ -3359,6 +3359,15 @@ export class MessageModel extends window.Backbone.Model { 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 messageId = this.idForLogging(); const count = reactions.length;