Question

I have set up a basic install of XMPPHP and to test it I tried sending a message from one of my gtalk (GoogleTalk) accounts to another gTalk account. The receiving account did not show the message, or the normal "user * has sent you a message: accept/block"

I then sent my receiving account a chat message from within the Google interface, and it prompted me (as expected) to add my account to the list of approved chat people.

Once my sending account was on the "approved" list, i was able successfully to send messages with xmpphp with no problem.

My question: Using xmpphp, how do i send an INVITATION to chat? I can send messages fine once the recipient accepts my incoming chats, but the first message sent does not trigger the chat program to prompt me to accept the messages.

As a follow-up...is there a way to find out if the recipient has accepted the request? ANy way to know that the messages are being delivered (or not)?

Was it helpful?

Solution

I had the same problem and the solution is to send a "subscribe" request before the message.

So just call

$conn->subscribe('someguy@someserver.net');

before

$conn->message('someguy@someserver.net', 'This is a test message!');
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top