diff options
-rw-r--r-- | skypeweb/libskypeweb.h | 3 | ||||
-rw-r--r-- | skypeweb/skypeweb_connection.c | 4 | ||||
-rw-r--r-- | skypeweb/skypeweb_messages.c | 4 |
3 files changed, 7 insertions, 4 deletions
diff --git a/skypeweb/libskypeweb.h b/skypeweb/libskypeweb.h index 1271382..0066d72 100644 --- a/skypeweb/libskypeweb.h +++ b/skypeweb/libskypeweb.h @@ -81,6 +81,9 @@ #define SKYPEWEB_LOGIN_HOST "login.skype.com" #define SKYPEWEB_VIDEOMAIL_HOST "vm.skype.com" +#define SKYPEWEB_CLIENTINFO_NAME "swx-skype.com" +#define SKYPEWEB_CLIENTINFO_VERSION "908/1.0.0.30" + typedef struct _SkypeWebAccount SkypeWebAccount; typedef struct _SkypeWebBuddy SkypeWebBuddy; diff --git a/skypeweb/skypeweb_connection.c b/skypeweb/skypeweb_connection.c index 8d1379b..b26e455 100644 --- a/skypeweb/skypeweb_connection.c +++ b/skypeweb/skypeweb_connection.c @@ -569,7 +569,7 @@ skypeweb_post_or_get(SkypeWebAccount *sa, SkypeWebMethod method, if (g_str_equal(host, SKYPEWEB_CONTACTS_HOST) || g_str_equal(host, SKYPEWEB_VIDEOMAIL_HOST)) { g_string_append_printf(request, "X-Skypetoken: %s\r\n", sa->skype_token); - g_string_append(request, "X-Stratus-Caller: swx-skype.com\r\n"); + g_string_append(request, "X-Stratus-Caller: " SKYPEWEB_CLIENTINFO_NAME "\r\n"); g_string_append(request, "X-Stratus-Request: abcd1234\r\n"); g_string_append(request, "Origin: https://web.skype.com\r\n"); g_string_append(request, "Referer: https://web.skype.com/main\r\n"); @@ -578,7 +578,7 @@ skypeweb_post_or_get(SkypeWebAccount *sa, SkypeWebMethod method, g_string_append_printf(request, "RegistrationToken: %s\r\n", sa->registration_token); g_string_append(request, "Referer: https://web.skype.com/main\r\n"); g_string_append(request, "Accept: application/json; ver=1.0;\r\n"); - g_string_append(request, "ClientInfo: os=Windows; osVer=8.1; proc=Win32; lcid=en-us; deviceType=1; country=n/a; clientName=swx-skype.com; clientVer=908/1.0.0.20\r\n"); + g_string_append(request, "ClientInfo: os=Windows; osVer=8.1; proc=Win32; lcid=en-us; deviceType=1; country=n/a; clientName=" SKYPEWEB_CLIENTINFO_NAME "; clientVer=" SKYPEWEB_CLIENTINFO_VERSION "\r\n"); } else { g_string_append_printf(request, "Accept: */*\r\n"); g_string_append_printf(request, "Cookie: %s\r\n", cookies); diff --git a/skypeweb/skypeweb_messages.c b/skypeweb/skypeweb_messages.c index 0d907f5..70fc066 100644 --- a/skypeweb/skypeweb_messages.c +++ b/skypeweb/skypeweb_messages.c @@ -573,7 +573,7 @@ skypeweb_get_registration_token(SkypeWebAccount *sa) "Accept: */*\r\n"
"BehaviorOverride: redirectAs404\r\n"
"LockAndKey: appId=" SKYPEWEB_LOCKANDKEY_APPID "; time=%s; lockAndKeyResponse=%s\r\n"
- "ClientInfo: os=Windows; osVer=8.1; proc=Win32; lcid=en-us; deviceType=1; country=n/a; clientName=swx-skype.com; clientVer=908/1.0.0.20\r\n"
+ "ClientInfo: os=Windows; osVer=8.1; proc=Win32; lcid=en-us; deviceType=1; country=n/a; clientName=" SKYPEWEB_CLIENTINFO_NAME "; clientVer=" SKYPEWEB_CLIENTINFO_VERSION "\r\n"
"Host: " SKYPEWEB_MESSAGES_HOST "\r\n"
"Content-Type: application/json\r\n"
"Authentication: skypetoken=%s\r\n"
@@ -634,7 +634,7 @@ skypeweb_set_statusid(SkypeWebAccount *sa, const gchar *status) if (sa->endpoint) {
gchar *url = g_strdup_printf("/v1/users/ME/endpoints/%s/presenceDocs/messagingService", purple_url_encode(sa->endpoint));
- post = "{\"id\":\"messagingService\", \"type\":\"EndpointPresenceDoc\", \"selfLink\":\"uri\", \"privateInfo\":{\"epname\":\"skype\"}, \"publicInfo\":{\"capabilities\":\"\", \"type\":1, \"skypeNameVersion\":\"908/1.0.20/swx-skype.com\", \"nodeInfo\":\"xx\", \"version\":\"908/1.0.20\"}}";
+ post = "{\"id\":\"messagingService\", \"type\":\"EndpointPresenceDoc\", \"selfLink\":\"uri\", \"privateInfo\":{\"epname\":\"skype\"}, \"publicInfo\":{\"capabilities\":\"\", \"type\":1, \"typ\":1, \"skypeNameVersion\":\"" SKYPEWEB_CLIENTINFO_VERSION "/" SKYPEWEB_CLIENTINFO_NAME "\", \"nodeInfo\":\"xx\", \"version\":\"" SKYPEWEB_CLIENTINFO_VERSION "\"}}";
skypeweb_post_or_get(sa, SKYPEWEB_METHOD_PUT | SKYPEWEB_METHOD_SSL, SKYPEWEB_MESSAGES_HOST, url, post, NULL, NULL, TRUE);
}
}
|