From 109c40e055145d51fbb55f7e96cbf509283c421c Mon Sep 17 00:00:00 2001 From: Ken Powers Date: Thu, 23 Jan 2020 14:52:40 -0500 Subject: [PATCH] Set correct fromId on reactions in all circumstances --- js/background.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/background.js b/js/background.js index af3a6b40b..78122f241 100644 --- a/js/background.js +++ b/js/background.js @@ -2086,7 +2086,7 @@ targetAuthorUuid: reaction.targetAuthorUuid, targetTimestamp: reaction.targetTimestamp.toNumber(), timestamp: Date.now(), - fromId: messageDescriptor.id, + fromId: data.source, }); // Note: We do not wait for completion here Whisper.Reactions.onReaction(reactionModel); @@ -2214,6 +2214,7 @@ event.confirm(); } else if (data.message.reaction) { const { reaction } = data.message; + const ourNumber = textsecure.storage.user.getNumber(); const reactionModel = Whisper.Reactions.add({ emoji: reaction.emoji, remove: reaction.remove, @@ -2221,7 +2222,7 @@ targetAuthorUuid: reaction.targetAuthorUuid, targetTimestamp: reaction.targetTimestamp.toNumber(), timestamp: Date.now(), - fromId: messageDescriptor.id, + fromId: ourNumber, }); // Note: We do not wait for completion here Whisper.Reactions.onReaction(reactionModel);