Delete right away if we already have the message

This commit is contained in:
Josh Perez 2020-07-27 14:15:32 -04:00 committed by Scott Nonnenberg
parent dfa846e4f3
commit 1ad2b175dc
10 changed files with 194 additions and 27 deletions

View file

@ -53,11 +53,22 @@
reaction.get('targetTimestamp')
);
if (!targetConversation) {
window.log.info(
'No contact for reaction',
reaction.get('targetAuthorE164'),
reaction.get('targetAuthorUuid'),
reaction.get('targetTimestamp')
);
return;
}
// awaiting is safe since `onReaction` is never called from inside the queue
await targetConversation.queueJob(async () => {
window.log.info(
'Handling reaction for',
reaction.get('targetTimestamp')
);
const messages = await window.Signal.Data.getMessagesBySentAt(
reaction.get('targetTimestamp'),
{