From 7d4d85a75584dcb14fd5cc47dd82132030e69d33 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Wed, 11 Nov 2020 19:03:56 -0800 Subject: [PATCH] Reactions: Don't send null 'remove' field --- ts/textsecure.d.ts | 2 +- ts/textsecure/SendMessage.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/textsecure.d.ts b/ts/textsecure.d.ts index ead342ba67..9e308a9ca0 100644 --- a/ts/textsecure.d.ts +++ b/ts/textsecure.d.ts @@ -622,7 +622,7 @@ export declare namespace DataMessageClass { class Reaction { emoji: string | null; - remove: boolean | null; + remove: boolean; targetAuthorE164: string | null; targetAuthorUuid: string | null; targetTimestamp: ProtoBigNumberType | null; diff --git a/ts/textsecure/SendMessage.ts b/ts/textsecure/SendMessage.ts index b0e6857638..4a3b876453 100644 --- a/ts/textsecure/SendMessage.ts +++ b/ts/textsecure/SendMessage.ts @@ -303,7 +303,7 @@ class Message { if (this.reaction) { proto.reaction = new window.textsecure.protobuf.DataMessage.Reaction(); proto.reaction.emoji = this.reaction.emoji || null; - proto.reaction.remove = this.reaction.remove || null; + proto.reaction.remove = this.reaction.remove || false; proto.reaction.targetAuthorE164 = this.reaction.targetAuthorE164 || null; proto.reaction.targetAuthorUuid = this.reaction.targetAuthorUuid || null; proto.reaction.targetTimestamp = this.reaction.targetTimestamp || null;