From 83a8df985fa79c03b9cc6bc9ff6c5586cd53ec58 Mon Sep 17 00:00:00 2001 From: jonalan Date: Thu, 30 Sep 2021 16:43:08 -0300 Subject: [PATCH] fix: lint --- src/lib/wapi/functions/check-number-status.js | 15 ++++++--------- src/lib/wapi/functions/check-send-exist.js | 2 +- .../wapi/serializers/serialize-number-status.js | 7 +++---- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/lib/wapi/functions/check-number-status.js b/src/lib/wapi/functions/check-number-status.js index 309690c6e..aa9d0cd6e 100644 --- a/src/lib/wapi/functions/check-number-status.js +++ b/src/lib/wapi/functions/check-number-status.js @@ -8,14 +8,11 @@ export async function checkNumberStatus(id, conn = true) { } if (conn === true) { const connection = window.Store.State.default.state; - if (connection !== "CONNECTED") { - Object.assign( - err, - { - text: "No connection with WhatsApp", - connection: connection - } - ); + if (connection !== 'CONNECTED') { + Object.assign(err, { + text: 'No connection with WhatsApp', + connection: connection + }); throw err; } } @@ -37,7 +34,7 @@ export async function checkNumberStatus(id, conn = true) { status: e.error, text: e.text, connection: e.connection, - jid: !!e.text ? undefined : new window.Store.WidFactory.createWid(id), + jid: e.text ? undefined : new window.Store.WidFactory.createWid(id) }); } } diff --git a/src/lib/wapi/functions/check-send-exist.js b/src/lib/wapi/functions/check-send-exist.js index 537b12fd6..f8f293744 100644 --- a/src/lib/wapi/functions/check-send-exist.js +++ b/src/lib/wapi/functions/check-send-exist.js @@ -141,7 +141,7 @@ export function sendCheckType(chatId = undefined) { 'incorrect parameters! Use as an example: 00000000-000000@g.us' ); } - } + } } export async function sendExist(chatId, returnChat = true, Send = true) { diff --git a/src/lib/wapi/serializers/serialize-number-status.js b/src/lib/wapi/serializers/serialize-number-status.js index 85dbd4bca..c12c991af 100644 --- a/src/lib/wapi/serializers/serialize-number-status.js +++ b/src/lib/wapi/serializers/serialize-number-status.js @@ -64,10 +64,9 @@ export const _serializeNumberStatusObj = (obj) => { status: obj.status, isBusiness: obj.biz === true, canReceiveMessage: obj.status === 200, - text: !!obj.text? obj.text : undefined, - connection: !!obj.connection? obj.connection : undefined, - profilePic: undefined, + text: obj.text ? obj.text : undefined, + connection: obj.connection ? obj.connection : undefined, + profilePic: undefined } ); }; -