--- a/libpurple/protocols/facebook/api.c Sat Feb 27 18:25:32 2021 -0600
+++ b/libpurple/protocols/facebook/api.c Sun Feb 28 21:46:06 2021 -0600
@@ -1426,6 +1426,23 @@
fb_api_cb_publish_ms_event(FbApi *api, JsonNode *root, GSList *events, FbApiEventType type, GError **error);
+fb_api_cb_publish_mst(FbThrift *thft, GError **error) + if (fb_thrift_read_isstop(thft)) { + FB_API_TCHK(fb_thrift_read_stop(thft)); + FB_API_TCHK(fb_thrift_read_field(thft, &type, &id, 0)); + FB_API_TCHK(type == FB_THRIFT_TYPE_STRING); + // FB_API_TCHK(id == 2); + FB_API_TCHK(fb_thrift_read_str(thft, NULL)); + FB_API_TCHK(fb_thrift_read_stop(thft)); fb_api_cb_publish_ms(FbApi *api, GByteArray *pload)
@@ -1455,10 +1472,14 @@
/* Read identifier string (for Facebook employees) */
thft = fb_thrift_new(pload, 0);
- fb_thrift_read_str(thft, NULL);
+ fb_api_cb_publish_mst(thft, &err); size = fb_thrift_get_pos(thft);
+ FB_API_ERROR_EMIT(api, err, g_return_if_fail(size < pload->len);
data = (gchar *) pload->data + size;
size = pload->len - size;
@@ -1768,10 +1789,10 @@
*press = g_slist_prepend(*press, pres);
- fb_util_debug_info("Presence: %" FB_ID_FORMAT " (%d)",
+ fb_util_debug_info("Presence: %" FB_ID_FORMAT " (%d) id: %d", if (fb_thrift_read_isstop(thft)) {
@@ -1818,7 +1839,9 @@
/* Read the field stop */
- FB_API_TCHK(fb_thrift_read_stop(thft));
+ if (fb_thrift_read_isstop(thft)) { + FB_API_TCHK(fb_thrift_read_stop(thft)); --- a/libpurple/protocols/facebook/api.h Sat Feb 27 18:25:32 2021 -0600
+++ b/libpurple/protocols/facebook/api.h Sun Feb 28 21:46:06 2021 -0600
@@ -97,7 +97,7 @@
* server started checking this.
-#define FB_ORCA_AGENT "[FBAN/Orca-Android;FBAV/109.0.0.17.70;FBPN/com.facebook.orca;FBLC/en_US;FBBV/52182662]"
+#define FB_ORCA_AGENT "[FBAN/Orca-Android;FBAV/537.0.0.31.101;FBPN/com.facebook.orca;FBLC/en_US;FBBV/52182662]"