From 1c022856b1ab08808834db247efe866a225db036 Mon Sep 17 00:00:00 2001 From: Beaudan Brown Date: Tue, 12 Nov 2019 09:28:30 +1100 Subject: [PATCH] Address review --- libtextsecure/sendmessage.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libtextsecure/sendmessage.js b/libtextsecure/sendmessage.js index abf0705ad..74a5d1656 100644 --- a/libtextsecure/sendmessage.js +++ b/libtextsecure/sendmessage.js @@ -452,7 +452,7 @@ MessageSender.prototype = { // Don't send to ourselves .filter(pubKey => pubKey !== textsecure.storage.user.getNumber()); if (allOurDevices.length === 0) { - return Promise.resolve(); + return null; } const dataMessage = textsecure.protobuf.DataMessage.decode( @@ -570,7 +570,11 @@ MessageSender.prototype = { )) // Don't send to ourselves .filter(pubKey => pubKey !== textsecure.storage.user.getNumber()); - if (allOurDevices.includes(contactConversation.id) || !primaryDeviceKey || allOurDevices.length === 0) { + if ( + allOurDevices.includes(contactConversation.id) || + !primaryDeviceKey || + allOurDevices.length === 0 + ) { // If we havn't got a primaryDeviceKey then we are in the middle of pairing return Promise.resolve(); }