From c836f9498c19a8446150c240c222760aea5a70d4 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Tue, 23 Oct 2012 05:34:23 +0000 Subject: Merge with Miranda IM: Improve on the phone patch git-svn-id: http://svn.miranda-ng.org/main/trunk@2058 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/JabberG/src/jabber_thread.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'protocols/JabberG') diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index 605f04cab8..41e49c8497 100644 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -1664,9 +1664,18 @@ void CJabberProto::OnProcessPresence( HXML node, ThreadData* info ) DBCheckIsTransportedContact( from, hContact ); int status = ID_STATUS_ONLINE; /* GTalk android user set status as on the phone */ - if (_tcsstr(from, _T("android_talk"))) - status = ID_STATUS_ONTHEPHONE; - else { + LPCTSTR pEndOfJID = NULL; + pEndOfJID = _tcsrchr(from, '/'); + if (pEndOfJID) + { + pEndOfJID++; + /*If the second half of JID (after /) starts with android, the contact is using android*/ + if(_tcsstr(pEndOfJID, _T("android")) == pEndOfJID) + { + status = ID_STATUS_ONTHEPHONE; + } + } + if (status == ID_STATUS_ONLINE) { if (( showNode = xmlGetChild( node , "show" )) != NULL ) { if (( show = xmlGetText( showNode ) ) != NULL ) { if ( !_tcscmp( show, _T("away"))) status = ID_STATUS_AWAY; -- cgit v1.2.3