eion/purple-hangouts

Parents 083125246ca1
Children 95a59a9d4d3b
Send through the gplus key for every api call to make the media api calls work \o/
--- a/hangouts_connection.c Mon May 09 16:01:30 2016 +1200
+++ b/hangouts_connection.c Mon May 09 21:15:44 2016 +1200
@@ -577,7 +577,7 @@
}
request = purple_http_request_new(NULL);
- purple_http_request_set_url_printf(request, "https://clients6.google.com%s%calt=%s", path, (strchr(path, '?') ? '&' : '?'), response_type_str);
+ purple_http_request_set_url_printf(request, HANGOUTS_PBLITE_API_URL "%s%ckey=" GOOGLE_GPLUS_KEY "&alt=%s", path, (strchr(path, '?') ? '&' : '?'), response_type_str);
purple_http_request_set_cookie_jar(request, ha->cookie_jar);
purple_http_request_header_set(request, "X-Goog-Encode-Response-If-Executable", "base64");
--- a/hangouts_connection.h Mon May 09 16:01:30 2016 +1200
+++ b/hangouts_connection.h Mon May 09 21:15:44 2016 +1200
@@ -29,7 +29,10 @@
#include "hangouts_pblite.h"
#include "hangouts.pb-c.h"
-#define HANGOUTS_PBLITE_XORIGIN_URL "https://talkgadget.google.com"
+#define HANGOUTS_PBLITE_XORIGIN_URL "https://hangouts.google.com"
+//#define HANGOUTS_PBLITE_XORIGIN_URL "https://talkgadget.google.com"
+#define HANGOUTS_PBLITE_API_URL "https://clients6.google.com"
+//#define HANGOUTS_PBLITE_API_URL "https://www.googleapis.com"
#define HANGOUTS_CHANNEL_URL_PREFIX "https://0.client-channel.google.com/client-channel/"
void hangouts_process_data_chunks(HangoutsAccount *ha, const gchar *data, gsize len);