diff options
author | dequis <dx@dxzone.com.ar> | 2017-03-29 09:19:19 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2017-03-29 09:26:26 -0300 |
commit | 1629e2f0cfe072118c845e8f7a2fc22005723188 (patch) | |
tree | c2eec577c6c013e718106e7d53f1258a67b4e45a /facebook | |
parent | 9390579fafa917b227059eb5ca7a7b3f4cda1051 (diff) | |
download | bitlbee-facebook-1629e2f0cfe072118c845e8f7a2fc22005723188.tar.gz bitlbee-facebook-1629e2f0cfe072118c845e8f7a2fc22005723188.tar.bz2 bitlbee-facebook-1629e2f0cfe072118c845e8f7a2fc22005723188.tar.xz |
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 'facebook')
-rw-r--r-- | facebook/facebook-api.c | 2 | ||||
-rw-r--r-- | facebook/facebook-api.h | 16 |
2 files changed, 17 insertions, 1 deletions
diff --git a/facebook/facebook-api.c b/facebook/facebook-api.c index eb0e8b4..341ac19 100644 --- a/facebook/facebook-api.c +++ b/facebook/facebook-api.c @@ -877,7 +877,7 @@ fb_api_cb_mqtt_open(FbMqtt *mqtt, gpointer data) /* 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); diff --git a/facebook/facebook-api.h b/facebook/facebook-api.h index 7cfce08..986a151 100644 --- a/facebook/facebook-api.h +++ b/facebook/facebook-api.h @@ -96,6 +96,22 @@ #define FB_API_AGENT "Facebook plugin / BitlBee / " PACKAGE_VERSION /** + * 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. |