Closed gustavoaf90 closed 1 year ago
same here
WhatsApp changed the way to call the queryExist, use it this way:
const _number = '553499999999';
Store.QueryExist.queryExist({ type: 'phone', phone: _number }).then(data => {
if (!data) {
throw 'Not found!';
}
return {
status: 200,
jid: data.wid
};
})
});
it's working.. How you can identify code changes by WhatsApp ?
it's working.. How you can identify code changes by WhatsApp ?
In WAPI.js, I insert "debugger" in the method, then debug the code when going into WhatsApp functions.
Thanks @vilsonei, Do you maintain a repo with WAPI.js up to date?
See my -> WAPI.js
Working sir,but its always returning true for all mobile numbers[mobile numbers which does have whatsapp and for invalid numbers also].Please verify once.
Thanks @vilsonei, Do you maintain a repo with WAPI.js up to date?
I have a project that uses wapi.js so I make some corrections to suit my project.
WhatsApp changed the way to call the queryExist, use it this way:
const _number = '553499999999'; Store.QueryExist.queryExist({ type: 'phone', phone: _number }).then(data => { if (!data) { throw 'Not found!'; } return { status: 200, jid: data.wid }; }) });
Hi @vilsonei
After using above code its return data always null,Please help
WhatsApp changed the way to call the queryExist, use it this way:
const _number = '553499999999'; Store.QueryExist.queryExist({ type: 'phone', phone: _number }).then(data => { if (!data) { throw 'Not found!'; } return { status: 200, jid: data.wid }; }) });
Hi @vilsonei
After using above code its return data always null,Please help
See my WAPI.js, there really were changes after I posted the solution.
WhatsApp changed the way to call the queryExist, use it this way:
const _number = '553499999999'; Store.QueryExist.queryExist({ type: 'phone', phone: _number }).then(data => { if (!data) { throw 'Not found!'; } return { status: 200, jid: data.wid }; }) });
Hi @vilsonei After using above code its return data always null,Please help
See my WAPI.js, there really were changes after I posted the solution.
HI @vilsonei
getting below response after using your wapi.js ,but this no on whatsapp
{id: "91XXXXXXXXXX@c.us", status: 404, isBusiness: false, canReceiveMessage: false}
WhatsApp changed the way to call the queryExist, use it this way:
const _number = '553499999999'; Store.QueryExist.queryExist({ type: 'phone', phone: _number }).then(data => { if (!data) { throw 'Not found!'; } return { status: 200, jid: data.wid }; }) });
Hi @vilsonei After using above code its return data always null,Please help
See my WAPI.js, there really were changes after I posted the solution.
HI @vilsonei getting below response after using your wapi.js ,but this no on whatsapp {id: "91XXXXXXXXXX@c.us", status: 404, isBusiness: false, canReceiveMessage: false}
Post your code here so we can take a look.
WhatsApp changed the way to call the queryExist, use it this way:
const _number = '553499999999'; Store.QueryExist.queryExist({ type: 'phone', phone: _number }).then(data => { if (!data) { throw 'Not found!'; } return { status: 200, jid: data.wid }; }) });
Hi @vilsonei After using above code its return data always null,Please help
See my WAPI.js, there really were changes after I posted the solution.
HI @vilsonei getting below response after using your wapi.js ,but this no on whatsapp {id: "91XXXXXXXXXX@c.us", status: 404, isBusiness: false, canReceiveMessage: false}
Post your code here so we can take a look.
Hi @vilsonei Please find code WAPIMD.js thanks for your cooperation
WhatsApp changed the way to call the queryExist, use it this way:
const _number = '553499999999'; Store.QueryExist.queryExist({ type: 'phone', phone: _number }).then(data => { if (!data) { throw 'Not found!'; } return { status: 200, jid: data.wid }; }) });
Hi @vilsonei After using above code its return data always null,Please help
See my WAPI.js, there really were changes after I posted the solution.
HI @vilsonei getting below response after using your wapi.js ,but this no on whatsapp {id: "91XXXXXXXXXX@c.us", status: 404, isBusiness: false, canReceiveMessage: false}
Post your code here so we can take a look.
Hi @vilsonei Please find code WAPIMD.js thanks for your cooperation
WhatsApp changed the way to call the queryExist, use it this way:
const _number = '553499999999'; Store.QueryExist.queryExist({ type: 'phone', phone: _number }).then(data => { if (!data) { throw 'Not found!'; } return { status: 200, jid: data.wid }; }) });
Hi @vilsonei After using above code its return data always null,Please help
See my WAPI.js, there really were changes after I posted the solution.
HI @vilsonei getting below response after using your wapi.js ,but this no on whatsapp {id: "91XXXXXXXXXX@c.us", status: 404, isBusiness: false, canReceiveMessage: false}
Post your code here so we can take a look.
Hi @vilsonei Please find code WAPIMD.js thanks for your cooperation
WhatsApp changed the way to call the queryExist, use it this way:
const _number = '553499999999'; Store.QueryExist.queryExist({ type: 'phone', phone: _number }).then(data => { if (!data) { throw 'Not found!'; } return { status: 200, jid: data.wid }; }) });
Hi @vilsonei After using above code its return data always null,Please help
See my WAPI.js, there really were changes after I posted the solution.
HI @vilsonei getting below response after using your wapi.js ,but this no on whatsapp {id: "91XXXXXXXXXX@c.us", status: 404, isBusiness: false, canReceiveMessage: false}
Post your code here so we can take a look.
Hi @vilsonei Please find code WAPIMD.js thanks for your cooperation
@vilsonei Please check this WAPIMD.js Thanks for your kind support.
WhatsApp changed the way to call the queryExist, use it this way:
const _number = '553499999999'; Store.QueryExist.queryExist({ type: 'phone', phone: _number }).then(data => { if (!data) { throw 'Not found!'; } return { status: 200, jid: data.wid }; }) });
Hi @vilsonei After using above code its return data always null,Please help
See my WAPI.js, there really were changes after I posted the solution.
HI @vilsonei getting below response after using your wapi.js ,but this no on whatsapp {id: "91XXXXXXXXXX@c.us", status: 404, isBusiness: false, canReceiveMessage: false}
Post your code here so we can take a look.
Hi @vilsonei Please find code WAPIMD.js thanks for your cooperation
WhatsApp changed the way to call the queryExist, use it this way:
const _number = '553499999999'; Store.QueryExist.queryExist({ type: 'phone', phone: _number }).then(data => { if (!data) { throw 'Not found!'; } return { status: 200, jid: data.wid }; }) });
Hi @vilsonei After using above code its return data always null,Please help
See my WAPI.js, there really were changes after I posted the solution.
HI @vilsonei getting below response after using your wapi.js ,but this no on whatsapp {id: "91XXXXXXXXXX@c.us", status: 404, isBusiness: false, canReceiveMessage: false}
Post your code here so we can take a look.
Hi @vilsonei Please find code WAPIMD.js thanks for your cooperation
@vilsonei Please check this WAPIMD.js Thanks for your kind support.
@vilsonei Please help
try like this: let number = '5541xxxxxxxx' WAPI.findJidFromNumber(number).then(data => { if (!data) { throw 'Not found!'; }
return {
data
};
}) ;
WhatsApp changed the way to call the queryExist, use it this way:
const _number = '553499999999'; Store.QueryExist.queryExist({ type: 'phone', phone: _number }).then(data => { if (!data) { throw 'Not found!'; } return { status: 200, jid: data.wid }; }) });
Hi @vilsonei After using above code its return data always null,Please help
See my WAPI.js, there really were changes after I posted the solution.
HI @vilsonei getting below response after using your wapi.js ,but this no on whatsapp {id: "91XXXXXXXXXX@c.us", status: 404, isBusiness: false, canReceiveMessage: false}
Post your code here so we can take a look.
Hi @vilsonei Please find code WAPIMD.js thanks for your cooperation
WhatsApp changed the way to call the queryExist, use it this way:
const _number = '553499999999'; Store.QueryExist.queryExist({ type: 'phone', phone: _number }).then(data => { if (!data) { throw 'Not found!'; } return { status: 200, jid: data.wid }; }) });
Hi @vilsonei After using above code its return data always null,Please help
See my WAPI.js, there really were changes after I posted the solution.
HI @vilsonei getting below response after using your wapi.js ,but this no on whatsapp {id: "91XXXXXXXXXX@c.us", status: 404, isBusiness: false, canReceiveMessage: false}
Post your code here so we can take a look.
Hi @vilsonei Please find code WAPIMD.js thanks for your cooperation
@vilsonei Please check this WAPIMD.js Thanks for your kind support.
@vilsonei Please help
I'm using:
WAPI.findJidFromNumber('554199999999')
See my -> WAPI.js
Dear sir,can you please share latest code,because after whatsapp update checkNumberStatus is not working,for invalid number also its returning true
WhatsApp changed the way to call the queryExist, use it this way:
const _number = '553499999999'; Store.QueryExist.queryExist({ type: 'phone', phone: _number }).then(data => { if (!data) { throw 'Not found!'; } return { status: 200, jid: data.wid }; }) });
Hi @vilsonei After using above code its return data always null,Please help
See my WAPI.js, there really were changes after I posted the solution.
HI @vilsonei getting below response after using your wapi.js ,but this no on whatsapp {id: "91XXXXXXXXXX@c.us", status: 404, isBusiness: false, canReceiveMessage: false}
Post your code here so we can take a look.
Hi @vilsonei Please find code WAPIMD.js thanks for your cooperation
WhatsApp changed the way to call the queryExist, use it this way:
const _number = '553499999999'; Store.QueryExist.queryExist({ type: 'phone', phone: _number }).then(data => { if (!data) { throw 'Not found!'; } return { status: 200, jid: data.wid }; }) });
Hi @vilsonei After using above code its return data always null,Please help
See my WAPI.js, there really were changes after I posted the solution.
HI @vilsonei getting below response after using your wapi.js ,but this no on whatsapp {id: "91XXXXXXXXXX@c.us", status: 404, isBusiness: false, canReceiveMessage: false}
Post your code here so we can take a look.
Hi @vilsonei Please find code WAPIMD.js thanks for your cooperation
@vilsonei Please check this WAPIMD.js Thanks for your kind support.
@vilsonei Please help
I'm using:
WAPI.findJidFromNumber('554199999999')
sir i am getting 404 while using checkNumberStatus and findJidFromNumber and checkNumberStatusNew is always returning true for valid and invalid whatsapp numbers
Change:
Store.QueryExist.queryExist({type:"phone", phone: number})
to
Store.QueryExist.queryExist('phone', number)
Note that now number must have format +9999999999@c.us
I use:
{ id: "WapQueryMD", conditions: (module) => module.queryExists && module.queryPhoneExists ? module : null},
And:
await window.Store.WapQueryMD.queryPhoneExists('55xxxxxxxxx')
Or:
await window.Store.WapQueryMD.queryPhoneExists('xxxxxxxxx')
This working for me!
@marcosdemelo
hi sir
can you share your WAPI.js to my email: [rock9987621@gmail.com]
I use:
{ id: "WapQueryMD", conditions: (module) => module.queryExists && module.queryPhoneExists ? module : null},
And:
await window.Store.WapQueryMD.queryPhoneExists('55xxxxxxxxx')
Or:await window.Store.WapQueryMD.queryPhoneExists('xxxxxxxxx')
This working for me!
not working now
@Masterxv
hi sir
can you share your full WAPI.js
Hi,
are you sure you are validating the phone like this?:
window.WAPI.checkNumberStatus = function (id, done) {
id = ***@***.***';
window.Store.QueryExist.queryExist({type:'phone',phone:id}).then((result)
=> {
if( done !== undefined) {
if (!result) {
done(window.WAPI._serializeNumberStatusObj({
status: 404,
jid : id.slice(1)
}));
throw 404;
}
done(window.WAPI._serializeNumberStatusObj({
status: 200,
jid : { server : id.split('@')[1], user :
id.split('@')[0].slice(1), _serialized : id.slice(1) }
}));
}
}).catch((e) => {
if (done !== undefined && !result) {
done(window.WAPI._serializeNumberStatusObj({
status: 404,
jid : id
}));
};
});
return true;
}
Xavier Freire Ortiz
+593 (9) 99597697
@.**@.>
@xavfo
LinkedIn: https://goo.gl/juM9ynhttps://goo.gl/juM9yn
Skype: @.**@.>
On 25-Nov-22 02:35, Masterxv wrote:
I use: |{ id: "WapQueryMD", conditions: (module) => module.queryExists && module.queryPhoneExists ? module : null},| And: |await window.Store.WapQueryMD.queryPhoneExists('55xxxxxxxxx')| Or: |await window.Store.WapQueryMD.queryPhoneExists('xxxxxxxxx')| This working for me!
not working now
— Reply to this email directly, view it on GitHub https://github.com/mukulhase/WebWhatsapp-Wrapper/issues/1162#issuecomment-1327111918, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJSSN3WOA6SE5B3OQMXRQJTWKBT5VANCNFSM525GP3KQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>
@Masterxv
it's not work!
await window.WAPI.checkNumberStatus('201152123310@c.us'); {id: undefined, status: 404, isBusiness: false, canReceiveMessage: false}
geting same problem again
This works for me...
const queryExist = window.Store.QueryExist || window.Store.QueryWidExists
const contact = await queryExist.queryPhoneExists(id)
const chat = contact?.jid || contact?.wid
Store.FindChat.findChat(chat)
.then(chat => chat.sendMessage(message))
.catch(e => console.error(`sendMessage error: ${id} (${message})`, e.message))
And
function getStore(modules) {
...
{ id: "QueryExist", conditions: (module) => (module.queryExist) ? module : null },
{ id: "QueryWidExists", conditions: (module) => module.queryWidExists ? module : null },
...
I use: { id: "WapQueryMD", conditions: (module) => module.queryExists && module.queryPhoneExists ? module : null},
And: await window.Store.WapQueryMD.queryPhoneExists('55xxxxxxxxx') Or: await window.Store.WapQueryMD.queryPhoneExists('xxxxxxxxx')
its not working now.. any fix
Store.WapQuery.queryExist stop working after whatsappweb update:
var query = await Store.WapQuery.queryExist("+NUMBER@c.us") bootstrap_qr.23ad9ad330d5249cc805.js:formatted:96321 Uncaught Error: user must have an id or a phone at t.USyncUser.validate (bootstrap_qr.23ad9ad330d5249cc805.js:formatted:78070) at bootstrap_qr.23ad9ad330d5249cc805.js:formatted:77672 at Array.filter ()
at t.USyncQuery._buildStanza (bootstrap_qr.23ad9ad330d5249cc805.js:formatted:77670)
at bootstrap_qr.23ad9ad330d5249cc805.js:formatted:77712
at Generator.next ()
at t (vendor1~bootstrap_qr.479b880772705c9f1664.js:formatted:4058)
at s (vendor1~bootstrap_qr.479b880772705c9f1664.js:formatted:4072)
at vendor1~bootstrap_qr.479b880772705c9f1664.js:formatted:4077
at Y (bootstrap_qr.23ad9ad330d5249cc805.js:formatted:19777)