aboutsummaryrefslogtreecommitdiffstats
path: root/facebook/facebook-api.h
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2017-03-30 00:53:46 -0300
committerdequis <dx@dxzone.com.ar>2017-03-30 00:53:46 -0300
commit2f17542c7a866f1963b0b51b01736652d53dd70d (patch)
treee320540f686a6ba92acaa0d6ac0e3a25ce82c669 /facebook/facebook-api.h
parent797b620055bbc7f5c901a1255861a905684449f4 (diff)
downloadbitlbee-facebook-2f17542c7a866f1963b0b51b01736652d53dd70d.tar.gz
bitlbee-facebook-2f17542c7a866f1963b0b51b01736652d53dd70d.tar.bz2
bitlbee-facebook-2f17542c7a866f1963b0b51b01736652d53dd70d.tar.xz
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.
Diffstat (limited to 'facebook/facebook-api.h')
-rw-r--r--facebook/facebook-api.h28
1 files changed, 19 insertions, 9 deletions
diff --git a/facebook/facebook-api.h b/facebook/facebook-api.h
index fa38d3d..7236b48 100644
--- a/facebook/facebook-api.h
+++ b/facebook/facebook-api.h
@@ -89,26 +89,36 @@
#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 / BitlBee / " PACKAGE_VERSION
+#define FB_API_AGENT "Facebook plugin / BitlBee / " PACKAGE_VERSION " " FB_ORCA_AGENT
/**
* FB_API_MQTT_AGENT
*
* The client information string sent in the MQTT CONNECT message
- *
- * 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_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
/**