diff options
author | dequis <dx@dxzone.com.ar> | 2017-03-29 16:02:25 +0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2017-03-29 16:02:25 +0300 |
commit | 36a3b7327d4eff15c40e694b8556dda0e8993067 (patch) | |
tree | 5b562eb9190f97935bbaba8007c31931a0caaf46 /patches | |
parent | 9e4c738f7ac2d5ddb711e8253174541ec350a5c8 (diff) |
Set the MQTT user agent to look like Orca-Android 38.0.0.22.155
Looks like this is what they use to discontinue older versions.
An empty user agent is treated as too old.
This fixes following error when sending messages:
This app version no longer supports messaging. To continue to send
and receive messages, please update your app to a newer version or
use the mobile web version of Facebook.
Diffstat (limited to 'patches')
-rw-r--r-- | patches/10-mqtt-agent.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/patches/10-mqtt-agent.patch b/patches/10-mqtt-agent.patch new file mode 100644 index 0000000..2d028af --- /dev/null +++ b/patches/10-mqtt-agent.patch @@ -0,0 +1,35 @@ +--- a/libpurple/protocols/facebook/api.c 2017-03-29 09:51:52.990185503 -0300 ++++ b/libpurple/protocols/facebook/api.c 2017-03-29 09:53:37.107663870 -0300 +@@ -885,7 +885,7 @@ + + /* Write the information string */ + fb_thrift_write_field(thft, FB_THRIFT_TYPE_STRING, 2, 1); +- fb_thrift_write_str(thft, ""); ++ fb_thrift_write_str(thft, FB_API_MQTT_AGENT); + + /* Write the UNKNOWN ("cp"?) */ + fb_thrift_write_field(thft, FB_THRIFT_TYPE_I64, 3, 2); +--- a/libpurple/protocols/facebook/api.h 2017-03-29 09:51:52.990185503 -0300 ++++ b/libpurple/protocols/facebook/api.h 2017-03-29 09:54:02.357053584 -0300 +@@ -98,6 +98,21 @@ + #define FB_API_AGENT "Facebook plugin / Purple / 0.9" + + /** ++ * 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]" ++ ++/** + * FB_API_URL_ATTACH: + * + * The URL for attachment URL requests. |