From c4170b32c6325ba9f84bba5e09285c8e1f4df7e7 Mon Sep 17 00:00:00 2001 From: dequis Date: Thu, 30 Mar 2017 02:27:02 -0300 Subject: 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. --- patches/12-http-agent.patch | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 patches/12-http-agent.patch 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: -- cgit v1.2.3