diff options
author | James Geboski <jgeboski@gmail.com> | 2016-01-14 16:29:18 -0500 |
---|---|---|
committer | James Geboski <jgeboski@gmail.com> | 2016-01-14 16:29:18 -0500 |
commit | f95eb36a6619753b2cb9cdfad88095d2e8778e72 (patch) | |
tree | 28c20ceaca37bcebf6abbc7c5e09f4e5b81023d8 | |
parent | 55a35e086223cd572b0f0d732321c2cfa141201a (diff) | |
download | pidgin-f95eb36a6619753b2cb9cdfad88095d2e8778e72.tar.gz |
facebook: fixed group chat join messages with incoming messages
When a group chat is opened because of an incoming message, it still
spams join messages for each of the users. This should act just as it
does if the group chat is explicitly opened, where all joining messages
are hidden from the user initially.
-rw-r--r-- | libpurple/protocols/facebook/facebook.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libpurple/protocols/facebook/facebook.c b/libpurple/protocols/facebook/facebook.c index dae866b1c4..d68e22340d 100644 --- a/libpurple/protocols/facebook/facebook.c +++ b/libpurple/protocols/facebook/facebook.c @@ -607,10 +607,17 @@ fb_cb_api_thread(FbApi *api, FbApiThread *thrd, gpointer data) FB_ID_TO_STR(thrd->tid, tid); chat = purple_conversations_find_chat_with_account(tid, acct); - active = (chat != NULL) && !purple_chat_conversation_has_left(chat); - if (!active) { + if ((chat == NULL) || purple_chat_conversation_has_left(chat)) { chat = purple_serv_got_joined_chat(gc, id, tid); + active = FALSE; + } else { + /* If there are no users in the group chat, including + * the local user, then the group chat has yet to be + * setup by this function. As a result, any group chat + * without users is inactive. + */ + active = purple_chat_conversation_get_users_count(chat) > 0; } name = purple_account_get_username(acct); |