Reactions: Don't send null 'remove' field

This commit is contained in:
Scott Nonnenberg 2020-11-11 19:03:56 -08:00 committed by GitHub
parent 7af2284c6b
commit 7d4d85a755
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

2
ts/textsecure.d.ts vendored
View File

@ -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;

View File

@ -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;