From d48063dc820429995b32e22323f3555a4827925f Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Wed, 3 Jun 2020 15:35:23 +1000 Subject: [PATCH] lint --- js/models/conversations.js | 2 +- libtextsecure/sendmessage.js | 36 ++++++++++++++++++++++-------------- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/js/models/conversations.js b/js/models/conversations.js index c887f59f4..008f5c861 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -262,7 +262,7 @@ messages.forEach(m => { m.acceptFriendRequest(); lastMessage = m; - }) + }); if (lastMessage) { await this.markRead(); diff --git a/libtextsecure/sendmessage.js b/libtextsecure/sendmessage.js index 962d68b98..986dd1df8 100644 --- a/libtextsecure/sendmessage.js +++ b/libtextsecure/sendmessage.js @@ -665,13 +665,14 @@ MessageSender.prototype = { return Promise.resolve(); } // first get all friends with primary devices - const sessionContactsPrimary = conversations.filter( - c => - c.isPrivate() && - !c.isOurLocalDevice() && - c.isFriend() && - !c.get('secondaryStatus') - ) || []; + const sessionContactsPrimary = + conversations.filter( + c => + c.isPrivate() && + !c.isOurLocalDevice() && + c.isFriend() && + !c.get('secondaryStatus') + ) || []; // then get all friends with secondary devices let sessionContactsSecondary = conversations.filter( @@ -683,14 +684,21 @@ MessageSender.prototype = { ); // then morph all secondary conversation to their primary - sessionContactsSecondary = await Promise.all(sessionContactsSecondary.map(async c => { - return window.ConversationController.getOrCreateAndWait( - c.getPrimaryDevicePubKey(), - 'private' - ); - })) || []; + sessionContactsSecondary = + (await Promise.all( + // eslint-disable-next-line arrow-body-style + sessionContactsSecondary.map(async c => { + return window.ConversationController.getOrCreateAndWait( + c.getPrimaryDevicePubKey(), + 'private' + ); + }) + )) || []; - const contactsSet = new Set([...sessionContactsPrimary, ...sessionContactsSecondary]); + const contactsSet = new Set([ + ...sessionContactsPrimary, + ...sessionContactsSecondary, + ]); const contacts = [...contactsSet]; if (contacts.length === 0) {