Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jonalan7 committed Sep 30, 2021
1 parent d617640 commit 83a8df9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
15 changes: 6 additions & 9 deletions src/lib/wapi/functions/check-number-status.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand All @@ -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)
});
}
}
2 changes: 1 addition & 1 deletion src/lib/wapi/functions/check-send-exist.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export function sendCheckType(chatId = undefined) {
'incorrect parameters! Use as an example: [email protected]'
);
}
}
}
}

export async function sendExist(chatId, returnChat = true, Send = true) {
Expand Down
7 changes: 3 additions & 4 deletions src/lib/wapi/serializers/serialize-number-status.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
);
};

0 comments on commit 83a8df9

Please sign in to comment.