From a83f5ce3e0562f44361a69374b70413500a83f22 Mon Sep 17 00:00:00 2001 From: Ken Powers Date: Mon, 16 Dec 2019 12:45:57 -0500 Subject: [PATCH] Drop reaction messages --- js/models/messages.js | 7 +++++++ protos/SignalService.proto | 12 +++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/js/models/messages.js b/js/models/messages.js index e7fc2796d..ea8087ced 100644 --- a/js/models/messages.js +++ b/js/models/messages.js @@ -1837,6 +1837,13 @@ `Starting handleDataMessage for message ${message.idForLogging()} in conversation ${conversation.idForLogging()}` ); + // Drop reaction messages at this time + if (initialMessage.reaction) { + window.log.info('Dropping reaction message', this.idForLogging()); + confirm(); + return; + } + // First, check for duplicates. If we find one, stop processing here. const existingMessage = await getMessageBySender(this.attributes, { Message: Whisper.Message, diff --git a/protos/SignalService.proto b/protos/SignalService.proto index 8dee65e71..39942c8de 100644 --- a/protos/SignalService.proto +++ b/protos/SignalService.proto @@ -169,6 +169,14 @@ message DataMessage { optional AttachmentPointer data = 4; } + message Reaction { + optional string emoji = 1; + optional bool remove = 2; + optional string targetAuthorE164 = 3; + optional string targetAuthorUuid = 4; + optional uint64 targetTimestamp = 5; + } + enum ProtocolVersion { option allow_alias = true; @@ -176,7 +184,8 @@ message DataMessage { MESSAGE_TIMERS = 1; VIEW_ONCE = 2; VIEW_ONCE_VIDEO = 3; - CURRENT = 3; + REACTIONS = 4; + CURRENT = 4; } optional string body = 1; @@ -192,6 +201,7 @@ message DataMessage { optional Sticker sticker = 11; optional uint32 requiredProtocolVersion = 12; optional bool isViewOnce = 14; + optional Reaction reaction = 16; } message NullMessage {