summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-05-06 17:25:06 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-05-06 17:25:06 +0000
commitd5d5dccc3c1da939fb26895d17de66c624cbd33a (patch)
tree02eeddd42c3b2f217b4b58ebfc67d19840fd5c3f /protocols
parentfe8490ae4e86e6ce87192983ea50eaebf6609cff (diff)
SkypeWeb: ProcessUserPresence fix.
git-svn-id: http://svn.miranda-ng.org/main/trunk@13468 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/SkypeWeb/src/skype_poll_processing.cpp24
1 files changed, 18 insertions, 6 deletions
diff --git a/protocols/SkypeWeb/src/skype_poll_processing.cpp b/protocols/SkypeWeb/src/skype_poll_processing.cpp
index 137d620be9..2e48339b86 100644
--- a/protocols/SkypeWeb/src/skype_poll_processing.cpp
+++ b/protocols/SkypeWeb/src/skype_poll_processing.cpp
@@ -92,10 +92,20 @@ void CSkypeProto::ProcessUserPresenceRes(JSONNODE *node)
ptrA selfLink(mir_t2a(ptrT(json_as_string(json_get(node, "selfLink")))));
ptrA status(mir_t2a(ptrT(json_as_string(json_get(node, "status")))));
- ptrA skypename(ContactUrlToName(selfLink));
- if (skypename == NULL)
+ char *skypename;
+
+ if (strstr(selfLink, "/8:"))
{
- if (IsMe(ptrA(SelfUrlToName(selfLink))))
+ skypename = ContactUrlToName(selfLink);
+ }
+ else if (strstr(selfLink, "/1:"))
+ {
+ skypename = SelfUrlToName(selfLink);
+ }
+
+ if (skypename != NULL)
+ {
+ if (IsMe(skypename))
{
int iNewStatus = SkypeToMirandaStatus(status);
int old_status = m_iStatus;
@@ -105,10 +115,12 @@ void CSkypeProto::ProcessUserPresenceRes(JSONNODE *node)
ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, iNewStatus);
return;
}
- return;
+ else
+ {
+ MCONTACT hContact = AddContact(skypename, true);
+ SetContactStatus(hContact, SkypeToMirandaStatus(status));
+ }
}
- MCONTACT hContact = AddContact(skypename, true);
- SetContactStatus(hContact, SkypeToMirandaStatus(status));
}
void CSkypeProto::ProcessNewMessageRes(JSONNODE *node)