Set correct fromId on reactions in all circumstances

This commit is contained in:
Ken Powers 2020-01-23 14:52:40 -05:00 committed by Scott Nonnenberg
parent 2906ff0ce4
commit 109c40e055
1 changed files with 3 additions and 2 deletions

View File

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