lhost / sendxmpp

perl-script to send xmpp (jabber), similar to what mail(1) does for mail.
64 stars 22 forks source link

Google Hangouts compatibility issue (solutions suggestion) #18

Open djozsef opened 8 years ago

djozsef commented 8 years ago

Problem

Sending message to a Google Hangouts partner does not work, eg.:

echo "Hello Pal, howdy'?" | sendxmpp -t -u mygoogleusername -o gmail.com  partnersgoogleaccount@gmail.com

The command gets executed, the protocol messages indicate no problem, but the message does not arrive, probably winds up in some evil /dev/null pit-hole.

Root cause

This problem derives from the fact Google required partners to be mutually accepted, that means the partners must have each other on their roster lists. When you look closely on such a roster list, you will see that Google assigns a special ID to the partners, something ending with @public.talk.google.com eg. j23nn3nl3239amnln89vbia@public.talk.google.com. You have to address your messages to this very ID to have the messages arriving, eg:

echo "Hello Pal, howdy'?" | sendxmpp -t -u mygoogleusername -o gmail.com  j23nn3nl3239amnln89vbia@public.talk.google.com

This roster ID is unique in each partner relation meaning that you have to query your roster list and look up the recipient partners ID to be able to send a message to him.

I am not very familiar with the XMPP protocol nor with Perl but this is what I found during my research and debug. I would like to suggest to implement a feature that checks the sender user's roster list for the roster ID of the recipient user and send the message to that.

What do you think?

lhost commented 8 years ago

This is a special "google" feature or it is a standard behaviour of any XMPP server?

lhost commented 8 years ago

will take a look on Net::XMPP::Roster module ;-)