venomous0x / WhatsAPI

Interface to WhatsApp Messenger
2.59k stars 2.13k forks source link

Nickname does not work (tests/whatsapp.php) #76

Open fkaul opened 12 years ago

fkaul commented 12 years ago

When sending a message through tests/whatsapp.php the nickname appearing at the lockscreen of the receivers phone is always the phonenumer.

Changing the nickname has no effect.

Can someone help me with that?

Cheers kaul

patschi commented 12 years ago

Because the name will be read out from the contacts from the smartphone.

fkaul commented 12 years ago

Of course - when I open whatsapp the message is displayed unter the correct contact. But in whatsapp you can define your own username as well. This username is used for the message display at the homescreen or the lockscreen. Its kind of a message preview. I think this is what they mean by "nickname" in the whatsapp.php.

Normally it would display something like Kaul: Hallo there!

But it shows: 4917296235269: Hallo there!

patschi commented 12 years ago

Did you sent the message to yourself?

fkaul commented 12 years ago

Yes I did.

patschi commented 12 years ago

Yes, I did it too and saw my own number. My friends (who got spammed from me :D) saw my name, which they saved in their contacts.

fkaul commented 12 years ago

I just tried sending it from another phone which makes no difference. Instead of the nickname the phone number is shown in the message preview at the homescreen.

arthursc commented 12 years ago

I can reproduce this issue with an Iphone as client. To fix this a presence stanza must be send at the beginning of the session.

That one looks something like this: <presence name="Nickname"></presence>

After that the incoming Iphone notification will appear with the nickname instead of the phonenumber. I created pull/77 for the fix. To use it $wa->sendNickname("nicknameyouwanttouse");

ruriimasu commented 11 years ago

how do i add nickname using the new codes in 1.2?

jesussales commented 11 years ago

Hello, yesterday i download the package, everything ok, it's great!!, but i have a problem when i want to send a nickname, i try with sendNickname($nickname) after the Login(), but no send messages, What's the problem? Sorry for my english, i am spanish thank's