diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-10-23 05:34:23 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-10-23 05:34:23 +0000 |
commit | c836f9498c19a8446150c240c222760aea5a70d4 (patch) | |
tree | e4d24a44b6127d415d3251c2a22c3b12578d9ac3 | |
parent | b42fe046c66bcdfbce14bac30e2d9f10d5172541 (diff) |
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
-rw-r--r-- | protocols/JabberG/src/jabber_thread.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
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;
|