whatsapp-web.js icon indicating copy to clipboard operation
whatsapp-web.js copied to clipboard

[BUG] QueryExists throws the error 'user must have an id or a phone' on a verified business number

Open tasaddaq-rana opened this issue 2 years ago • 5 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Describe the bug

when try to check number is register or not.

Expected behavior

Number should be verified

Steps to Reproduce the Bug or Issue

check number is registered or not

Relevant Code

No response

Browser Type

Google Chrome

WhatsApp Account Type

WhatsApp Business

Does your WhatsApp account have multidevice enabled?

Yes, I am using Multi Device

Environment

Getting error Uncaught Error: user must have an id or a phone

Additional context

No response

tasaddaq-rana avatar Nov 25 '22 12:11 tasaddaq-rana

there is the same problem

jestergods avatar Nov 25 '22 12:11 jestergods

please helpp!!!

bvr218 avatar Nov 25 '22 22:11 bvr218

there is the same problem please help!!! @pedroslopez

nuz-faiz avatar Nov 26 '22 07:11 nuz-faiz

Instead of using QueryExist use the queryPhoneExists module.

// inject into "window" object.
window.Store.QueryPhoneExists = window.mR.findModule('queryPhoneExists')[0].queryPhoneExists;

const phoneNumber = "+316...";
const doesExist = await window.Store.QueryPhoneExists(phoneNumber);

Can you write a PR? or at least test the efficacy of both QueryExist and queryPhoneExists?

purpshell avatar Dec 29 '22 11:12 purpshell