diff -r 36e7d457c3d1 -r 44e088051f69 libpurple/protocols/facebook/api.c --- a/libpurple/protocols/facebook/api.c Sat Jun 24 23:58:35 2017 -0300 +++ b/libpurple/protocols/facebook/api.c Sun Jun 25 01:56:20 2017 -0300 @@ -436,6 +436,22 @@ 1, FB_TYPE_ID); /** + * FbApi::thread-kicked: + * @api: The #FbApi. + * @thrd: The #FbApiThread. + * + * Emitted upon the reply of a thread request when the user is no longer + * part of that thread. This is emitted as a result of #fb_api_thread(). + */ + g_signal_new("thread-kicked", + G_TYPE_FROM_CLASS(klass), + G_SIGNAL_ACTION, + 0, + NULL, NULL, NULL, + G_TYPE_NONE, + 1, G_TYPE_POINTER); + + /** * FbApi::threads: * @api: The #FbApi. * @thrds: The #GSList of #FbApiThread's. @@ -2656,7 +2672,6 @@ } if (num_users < 2 || !haself) { - fb_api_thread_reset(thrd, TRUE); g_object_unref(values); return FALSE; } @@ -2692,8 +2707,12 @@ if (!fb_api_thread_parse(api, &thrd, node, &err)) { if (G_LIKELY(err == NULL)) { - fb_api_error(api, FB_API_ERROR_GENERAL, - _("Failed to parse thread information")); + if (thrd.tid) { + g_signal_emit_by_name(api, "thread-kicked", &thrd); + } else { + fb_api_error(api, FB_API_ERROR_GENERAL, + _("Failed to parse thread information")); + } } else { fb_api_error_emit(api, err); }