From 1c0ee54dedd808a106ca64edd249598def1c9ed3 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Sat, 1 Aug 2015 18:44:27 +0000 Subject: SkypeWeb: More fixes & optimization git-svn-id: http://svn.miranda-ng.org/main/trunk@14783 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_poll_processing.cpp | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'protocols/SkypeWeb/src/skype_poll_processing.cpp') diff --git a/protocols/SkypeWeb/src/skype_poll_processing.cpp b/protocols/SkypeWeb/src/skype_poll_processing.cpp index b586e67eab..06390a3a62 100644 --- a/protocols/SkypeWeb/src/skype_poll_processing.cpp +++ b/protocols/SkypeWeb/src/skype_poll_processing.cpp @@ -29,8 +29,6 @@ void CSkypeProto::ProcessEndpointPresenceRes(const JSONNode &node) if (hContact == NULL) return; - //"publicInfo":{"capabilities":"","typ":"11","skypeNameVersion":"0/7.1.0.105//","nodeInfo":"","version":"24"} - //"privateInfo": {"epname": "Skype"} const JSONNode &publicInfo = node["publicInfo"]; const JSONNode &privateInfo = node["privateInfo"]; CMStringA MirVer = ""; @@ -107,16 +105,7 @@ void CSkypeProto::ProcessUserPresenceRes(const JSONNode &node) std::string selfLink = node["selfLink"].as_string(); std::string status = node["status"].as_string(); - CMStringA skypename; - - if (selfLink.find("/8:") != std::string::npos) - { - skypename = UrlToSkypename(selfLink.c_str()); - } - else if (selfLink.find("/1:") != std::string::npos) - { - skypename = UrlToSkypename(selfLink.c_str()); - } + CMStringA skypename = UrlToSkypename(selfLink.c_str()); if (!skypename.IsEmpty()) { @@ -127,8 +116,9 @@ void CSkypeProto::ProcessUserPresenceRes(const JSONNode &node) m_iDesiredStatus = iNewStatus; m_iStatus = iNewStatus; if (old_status != iNewStatus) + { ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, iNewStatus); - return; + } } else { @@ -141,7 +131,7 @@ void CSkypeProto::ProcessUserPresenceRes(const JSONNode &node) void CSkypeProto::ProcessNewMessageRes(const JSONNode &node) { - debugLogA("CSkypeProto::ProcessNewMessageRes"); + debugLogA(__FUNCTION__); std::string conversationLink = node["conversationLink"].as_string(); -- cgit v1.2.3