[ejabberd] Make Hangout users appear offline instead of away / Hangout vs. XMPP findings

dev at jabber.fsinf.de dev at jabber.fsinf.de
Thu Oct 24 17:23:01 MSK 2013


On Thu, 24 Oct 2013, tot-to wrote:

> Are you sure it's because of Hangouts?

Yes, to my knowledge it is.

I just did some testing:

* In the Gmail webfrontend you can choose between the old XMPP compliant 
client and Hangout (some time ago you were asked whether you want to 
switch, and you can still go back and forth).

* Hangout clients will appear with a "MessagingXXXXXXXXX" (Android Hangout 
client) or "messaging-smgmailXXXXXXXXX" (Gmail Hangout client) resource on 
the XMPP network. The Android client will be perpetually "Away"; the Gmail 
client seems to appear as normal "Online".

* Messages sent to Hangout by XMPP *get lost*! I hoped they would get 
stored server side and delivered the next time the gmail user logs in 
using a XMPP client but this is not the case. Interestingly, offline 
messages still work if no Hangout client is logged in at the time the 
message is sent (they even work if the messaged user logs in using Hangout 
later and only after that logs in using some XMPP client).

* It can be difficult to actually log out from Hangout. On Android, the 
log out option is hidden in settings; in Gmail Hangout, you stay logged 
in on XMPP even when logging out from Gmail; you have to explicitely log 
out in the Hangout pane.

* Contacts added in Hangout are visible in the XMPP roster if logging in 
to gmail via XMPP, too, but sometimes with strange IDs. Apparently, 
Google+ users get some hash at public.talk.google.com address; people without 
Google+ accounts get some user-at-server-hash at public.talk.google.com 
address. I'm not sure you can use these address schemes from non-Google 
XMPP servers; this appears to be a major mess.

> Also, you don't take into account one bad concequence of your
> resolution. When you'll write an offline message, you'll never know
> either it'll be received by the contact or will be lost because of this
> connection.

True. Then again, Google made such a big mess out of all that that I'll 
happily advise never to use offline messages with @gmail.com people. Also, 
who knows if the current behaviour stays as it is now.

So, to come back to my (now updated) original question: How to implement 
logic like "If presence gets sent from an @gmail.com address with 
MessagingXXXXXXXXX or messaging-smgmailXXXXXXXXX resource, ignore that" in 
ejabberd? Patching the code is fine; I guess the change should be fairly 
minor...?

TIA!


More information about the ejabberd mailing list