Skip to content

Commit

Permalink
fix: send group
Browse files Browse the repository at this point in the history
  • Loading branch information
jonalan7 committed Oct 19, 2021
1 parent a4cd8ef commit 58b46d6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/lib/wapi/functions/check-send-exist.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,13 @@ export async function sendExist(chatId, returnChat = true, Send = true) {
}
let ck = await window.WAPI.checkNumberStatus(chatId);

if (ck.status === 404 && !ck.id._serialized.includes('@g.us')) {
if (
ck.status === 404 &&
ck.id &&
ck.id._serialized &&
ck.id._serialized.include &&
!ck.id._serialized.include('@g.us')
) {
return WAPI.scope(chatId, true, ck.status, 'The number does not exist');
}

Expand Down

0 comments on commit 58b46d6

Please sign in to comment.