Closed Diden05 closed 4 years ago
Do not spam, just send your contact.
Regard
On Sat, 23 May 2020, 10:16 am Denis Didenko, notifications@github.com wrote:
Is it possible, somehow, before sending a message to find out if the recipient has an installed Whatsapp application?
I thought you could use the Exist function, but did not find what this or that code means.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Rhymen/go-whatsapp/issues/373, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABDLT25KPFR6ZNEXFBBQWSLRS5Z3TANCNFSM4NIKUGGQ .
Do not spam, just send your contact. Regard
And who said about spam, there are many scenarios when you need to check if the phone has a whatsapp.
It is just an advice. sorry for the inconvenience
value, err : wh.Wac.Exist(wa.WidJidFromNumber(phoneNumber+"@s.whatsapp.net"));
if err != nil {
fmt.Printf("Error: ", err)
}
fmt.Printf("json: ", value)
https://github.com/Rhymen/go-whatsapp/blob/18dafd1f0c73172eeeaaaf7022c8b7e8518d480b/contact.go#L89
value, err : wh.Wac.Exist(wa.WidJidFromNumber(phoneNumber+"@s.whatsapp.net")); if err != nil { fmt.Printf("Error: ", err) } fmt.Printf("json: ", value)
https://github.com/Rhymen/go-whatsapp/blob/18dafd1f0c73172eeeaaaf7022c8b7e8518d480b/contact.go#L89
Excellent thank you!
Maybe you know the answer to another question, but how to check the activity of your connection, is everything all right, can I send a message?
Sure
pong, err := wac.AdminTest()
if !pong || err != nil {
log.Fatalf("error pinging in: %v\n", err)
}
Thanx!
Thanx!
Glad to help you... Have a great day
@beshoo Perhaps you know, another question arose, is it possible to add a contact to your contact list? So that you can normally correspond with a person?
No. 😉
On Fri, 29 May 2020, 11:22 am Denis Didenko, notifications@github.com wrote:
@beshoo https://github.com/beshoo Perhaps you know, another question arose, is it possible to add a contact to your contact list? So that you can normally correspond with a person?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Rhymen/go-whatsapp/issues/373#issuecomment-635842494, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABDLT2ZZABROA2I7VNP2VTTRT5WF7ANCNFSM4NIKUGGQ .
No. 😉 … On Fri, 29 May 2020, 11:22 am Denis Didenko, @.***> wrote: @beshoo https://github.com/beshoo Perhaps you know, another question arose, is it possible to add a contact to your contact list? So that you can normally correspond with a person? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#373 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABDLT2ZZABROA2I7VNP2VTTRT5WF7ANCNFSM4NIKUGGQ .
Thank you, I decided these questions :)
Is it possible, somehow, before sending a message to find out if the recipient has an installed Whatsapp application?
I thought you could use the Exist function, but did not find what this or that code means.