Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dequis/purple-facebook.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2017-03-30 08:27:02 +0300
committerdequis <dx@dxzone.com.ar>2017-03-30 08:27:02 +0300
commitc4170b32c6325ba9f84bba5e09285c8e1f4df7e7 (patch)
tree5c60ec94eabcc08e42a6ff4c64421eb441919992
parent5061391e989b53e68f919bb0e75e12584364683a (diff)
Send orca-formatted user agent for all HTTP requests too
Fixes "Failed to parse thread information" errors when joining channels. Facebook rolled a hotfix update today and they are requiring the same user agent for HTTP requests too. As far as I can see the main affected request is ThreadQuery. Hopefully this also solves issues some a tiny minority of people were still having with sync sequence ids.
-rw-r--r--patches/12-http-agent.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/patches/12-http-agent.patch b/patches/12-http-agent.patch
new file mode 100644
index 0000000..d2a538f
--- /dev/null
+++ b/patches/12-http-agent.patch
@@ -0,0 +1,41 @@
+--- a/libpurple/protocols/facebook/api.h 2017-03-30 02:23:36.028335349 -0300
++++ b/libpurple/protocols/facebook/api.h 2017-03-30 02:24:46.796992132 -0300
+@@ -91,11 +91,28 @@
+ #define FB_API_SECRET "374e60f8b9bb6b8cbb30f78030438895"
+
+ /**
++ * FB_ORCA_AGENT
++ *
++ * The part of the user agent that looks like the official client, since the
++ * server started checking this.
++ *
++ * We announce ourselves as compatible with Orca-Android 38.0 since that's the
++ * closest version to the last major protocol update. Some parts use older
++ * features, some parts use newer ones.
++ *
++ * Fun fact: this version sends old-style MQIsdp CONNECT messages for the first
++ * connection, with JSON payloads instead of compressed thrift.
++ *
++ */
++
++#define FB_ORCA_AGENT "[FBAN/Orca-Android;FBAV/38.0.0.22.155;FBBV/14477681]"
++
++/**
+ * FB_API_AGENT:
+ *
+ * The HTTP User-Agent header.
+ */
+-#define FB_API_AGENT "Facebook plugin / Purple / 0.9"
++#define FB_API_AGENT "Facebook plugin / Purple / 0.9.3 " FB_ORCA_AGENT
+
+ /**
+ * FB_API_MQTT_AGENT
+@@ -110,7 +127,7 @@
+ * connection, with JSON payloads instead of compressed thrift.
+ */
+
+-#define FB_API_MQTT_AGENT FB_API_AGENT " [FBAN/Orca-Android;FBAV/38.0.0.22.155;FBBV/14477681]"
++#define FB_API_MQTT_AGENT FB_API_AGENT
+
+ /**
+ * FB_API_URL_ATTACH: