From 079747e6cf38257134237cbbd5f4e7857273afdc Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Fri, 3 Apr 2015 09:15:43 +0000 Subject: full mirver git-svn-id: http://svn.miranda-ng.org/main/trunk@12584 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/requests/endpoint.h | 6 +++++- protocols/SkypeWeb/src/skype_poll_processing.cpp | 9 +++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/protocols/SkypeWeb/src/requests/endpoint.h b/protocols/SkypeWeb/src/requests/endpoint.h index a5d05b7ec7..bc5be2b096 100644 --- a/protocols/SkypeWeb/src/requests/endpoint.h +++ b/protocols/SkypeWeb/src/requests/endpoint.h @@ -17,7 +17,11 @@ public: << CHAR_VALUE("Origin", "https://web.skype.com") << CHAR_VALUE("Connection", "keep-alive"); CMStringA data; - data.AppendFormat ("{\"id\":\"messagingService\",\"type\":\"EndpointPresenceDoc\",\"selfLink\":\"uri\",\"privateInfo\":{\"epname\":\"Miranda\"},\"publicInfo\":{\"capabilities\":\"\",\"typ\":125,\"skypeNameVersion\":\"0/%s//\",\"nodeInfo\":\"xx\",\"version\":\"0/%s\"}}", MIRANDA_VERSION_STRING, MIRANDA_VERSION_STRING); +#ifdef _WIN64 + data.AppendFormat ("{\"id\":\"messagingService\",\"type\":\"EndpointPresenceDoc\",\"selfLink\":\"uri\",\"privateInfo\":{\"epname\":\"Miranda\"},\"publicInfo\":{\"capabilities\":\"\",\"typ\":125,\"skypeNameVersion\":\"Miranda NG Skype\",\"nodeInfo\":\"xx\",\"version\":\"%s x64\"}}", MIRANDA_VERSION_STRING); +#else + data.AppendFormat("{\"id\":\"messagingService\",\"type\":\"EndpointPresenceDoc\",\"selfLink\":\"uri\",\"privateInfo\":{\"epname\":\"Miranda\"},\"publicInfo\":{\"capabilities\":\"\",\"typ\":125,\"skypeNameVersion\":\"Miranda NG Skype\",\"nodeInfo\":\"xx\",\"version\":\"%s x86\"}}", MIRANDA_VERSION_STRING); +#endif Body << VALUE(data); } diff --git a/protocols/SkypeWeb/src/skype_poll_processing.cpp b/protocols/SkypeWeb/src/skype_poll_processing.cpp index 5597257188..1615b13c5c 100644 --- a/protocols/SkypeWeb/src/skype_poll_processing.cpp +++ b/protocols/SkypeWeb/src/skype_poll_processing.cpp @@ -13,7 +13,8 @@ void CSkypeProto::ProcessEndpointPresenceRes(JSONNODE *node) JSONNODE *publicInfo = json_get(node, "publicInfo"); if (publicInfo != NULL) { - ptrA version(mir_t2a(ptrT(json_as_string(json_get(publicInfo, "skypeNameVersion"))))); + ptrA skypeNameVersion(mir_t2a(ptrT(json_as_string(json_get(publicInfo, "skypeNameVersion"))))); + ptrA version(mir_t2a(ptrT(json_as_string(json_get(publicInfo, "version"))))); ptrA typ(mir_t2a(ptrT(json_as_string(json_get(publicInfo, "typ"))))); if (typ != NULL) { @@ -36,7 +37,11 @@ void CSkypeProto::ProcessEndpointPresenceRes(JSONNODE *node) else if (!mir_strcmpi(typ, "1")) //SkypeWeb db_set_s(hContact, m_szModuleName, "MirVer", "Skype (Web)"); else if (!mir_strcmpi(typ, "125")) //Miranda - db_set_s(hContact, m_szModuleName, "MirVer", "Miranda NG"); + { + char ver[MAX_PATH]; + mir_snprintf(ver, SIZEOF(ver), "%s %s", skypeNameVersion, version); + db_set_s(hContact, m_szModuleName, "MirVer", ver); + } } -- cgit v1.2.3