From 03757ba2ca3d3bca74029bfbd453a368b66cb4df Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Thu, 28 May 2020 09:58:42 +1000 Subject: [PATCH] lint --- integration_test/message_sync_test.js | 6 +++++- js/models/messages.js | 2 +- js/modules/loki_file_server_api.js | 2 +- libtextsecure/outgoing_message.js | 20 ++++++++++++++------ 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/integration_test/message_sync_test.js b/integration_test/message_sync_test.js index aed62ef1d..35b36657f 100644 --- a/integration_test/message_sync_test.js +++ b/integration_test/message_sync_test.js @@ -137,6 +137,10 @@ describe('Message Syncing', function() { 1 ); // be sure only one autoFR accept was sent (even if multi device, we need to reply to that specific device only) - await common.logsContains(bob1Logs, `Sending auto-friend-accept:onlineBroadcast message to`, 1); + await common.logsContains( + bob1Logs, + `Sending auto-friend-accept:onlineBroadcast message to`, + 1 + ); }); }); diff --git a/js/models/messages.js b/js/models/messages.js index 8b38150de..d3928ec3c 100644 --- a/js/models/messages.js +++ b/js/models/messages.js @@ -2082,7 +2082,7 @@ return false; }, async handleSessionRequest(source, confirm) { - window.console.log(`Received SESSION_REQUEST from source: ${source}`) + window.console.log(`Received SESSION_REQUEST from source: ${source}`); window.libloki.api.sendSessionEstablishedMessage(source); confirm(); }, diff --git a/js/modules/loki_file_server_api.js b/js/modules/loki_file_server_api.js index 08e599524..ed8533114 100644 --- a/js/modules/loki_file_server_api.js +++ b/js/modules/loki_file_server_api.js @@ -1,4 +1,4 @@ -/* global log, libloki, process, window */ +/* global log, libloki, window */ /* global storage: false */ /* global Signal: false */ /* global log: false */ diff --git a/libtextsecure/outgoing_message.js b/libtextsecure/outgoing_message.js index 2762f1af5..c0485efed 100644 --- a/libtextsecure/outgoing_message.js +++ b/libtextsecure/outgoing_message.js @@ -6,7 +6,6 @@ libloki, StringView, lokiMessageAPI, - i18n, log */ @@ -216,7 +215,11 @@ OutgoingMessage.prototype = { this.errors[this.errors.length] = error; this.numberCompleted(); }, - reloadDevicesAndSend(primaryPubKey, multiDevice = true, excludedDevices = []) { + reloadDevicesAndSend( + primaryPubKey, + multiDevice = true, + excludedDevices = [] + ) { const ourNumber = textsecure.storage.user.getNumber(); if (!multiDevice) { @@ -232,10 +235,11 @@ OutgoingMessage.prototype = { .getAllDevicePubKeysForPrimaryPubKey(primaryPubKey) // Don't send to ourselves .then(devicesPubKeys => - devicesPubKeys.filter(pubKey => pubKey !== ourNumber && !excludedDevices.includes(pubKey)) + devicesPubKeys.filter( + pubKey => pubKey !== ourNumber && !excludedDevices.includes(pubKey) + ) ) .then(devicesPubKeys => { - if (devicesPubKeys.length === 0) { // No need to start the sending of message without a recipient return Promise.resolve(); @@ -709,7 +713,11 @@ OutgoingMessage.prototype = { } catch (e) { // do nothing } - return this.reloadDevicesAndSend(number, multiDevice, excludedDevices).catch(error => { + return this.reloadDevicesAndSend( + number, + multiDevice, + excludedDevices + ).catch(error => { conversation.resetPendingSend(); if (error.message === 'Identity key changed') { // eslint-disable-next-line no-param-reassign @@ -761,7 +769,7 @@ OutgoingMessage.buildSessionRequestMessage = function buildSessionRequestMessage pubKey ) { const body = - '(If you see this message, you must be using an out-of-date client)'; + '(If you see this message, you must be using an out-of-date client)'; const flags = textsecure.protobuf.DataMessage.Flags.SESSION_REQUEST;