diff options
-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. |