Вопрос

I am using the agsXMPP SDK to create a small GTalk client in C#.

XmppClientConnection connection = new XmppClientConnection();
.
.
.
connection.OnPresence += new PresenceHandler(xmpp_OnPresence);

private void xmpp_OnPresence(object sender, Presence pres)
{
 Console.WriteLine(pres.pres.From.User); // this is "3aav33e8erudg29gzjg***"
}

I can read most contacts with their username, but some are not very useful. This is the body:

<presence xmlns="jabber:client" from="3aav33e8erudg29gzjg*****c@public.talk.google.com/android_talkc2f2f*******" to="**************@gmail.com/agsXMPP678C2F26"><priority>24</priority><caps:c xmlns:caps="http://jabber.org/protocol/caps" node="http://www.android.com/gtalk/client/caps" ver="1.1" ext="pmuc-v1 voice-v1 video-v1 camera-v1" /><show>away</show><x xmlns="vcard-temp:x:update"><photo>4d211fc**************90a130a1345425b1e</photo></x></presence>

Is there any way to get a readable username from this? This person seems to be my contact, but I don't know who it is...

Это было полезно?

Решение

This are automatically created contacts from Google+ circles as far as I know. The real Google id is hidden for privacy reasons. If you don't want these contacts you can disable them in the G+ Chat privacy settings.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top