tulir / whatsmeow

Go library for the WhatsApp web multidevice API
https://go.mau.fi/whatsmeow
Mozilla Public License 2.0
2.29k stars 427 forks source link

Get Pushname #576

Closed refaldyrk closed 6 months ago

refaldyrk commented 6 months ago

how can i get push name without send message or receive message?

SoursopID commented 6 months ago

PushName automatically updated via *events.<...> that received in whatsmeow client. You can get it in contacts info. Client.Store.Contacts.GetContact(jid).

https://github.com/tulir/whatsmeow/issues/202#issuecomment-1183411947

refaldyrk commented 6 months ago

So I want to input a number or JID, without having to communicate with him, so it's like a random person, and then I want to see his push name., how?

SoursopID commented 6 months ago

Currently there is no way to get a pushname directly without ever communicating.

The PushName is sent within the first message is sent, and the next name update will be received in the form of a PushName change event (*events.<...>) broadcast by the user account.

refaldyrk commented 6 months ago

Thanks