From 873dadef48ec8afd9ab68fffae9b9802c272cfb6 Mon Sep 17 00:00:00 2001 From: Mikunj Date: Wed, 13 May 2020 11:00:38 +1000 Subject: [PATCH] Lint --- libtextsecure/message_receiver.js | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/libtextsecure/message_receiver.js b/libtextsecure/message_receiver.js index 86806920f..631a92f94 100644 --- a/libtextsecure/message_receiver.js +++ b/libtextsecure/message_receiver.js @@ -1252,9 +1252,7 @@ MessageReceiver.prototype.extend({ if (!friendRequest && this.isMessageEmpty(message)) { window.log.warn( - `Message ${this.getEnvelopeId( - envelope - )} ignored; it was empty` + `Message ${this.getEnvelopeId(envelope)} ignored; it was empty` ); return this.removeFromCache(envelope); } @@ -1274,8 +1272,26 @@ MessageReceiver.prototype.extend({ }) ); }, - isMessageEmpty({ body, attachments, group, flags, quote, contact, preview, groupInvitation }) { - return !flags && _.isEmpty(body) && _.isEmpty(attachments) && _.isEmpty(group) && _.isEmpty(quote) && _.isEmpty(contact) && _.isEmpty(preview) && _.isEmpty(groupInvitation) + isMessageEmpty({ + body, + attachments, + group, + flags, + quote, + contact, + preview, + groupInvitation, + }) { + return ( + !flags && + _.isEmpty(body) && + _.isEmpty(attachments) && + _.isEmpty(group) && + _.isEmpty(quote) && + _.isEmpty(contact) && + _.isEmpty(preview) && + _.isEmpty(groupInvitation) + ); }, handleLegacyMessage(envelope) { return this.decrypt(envelope, envelope.legacyMessage).then(plaintext => {