pidgin/pidgin

2a83ef0aed86
Parents 643d7b0aadbd
Children 953d004873ec
facebook: fixed nonfunctional group chat auto-rejoining
--- a/libpurple/protocols/facebook/facebook.c Sat Dec 26 18:01:00 2015 -0500
+++ b/libpurple/protocols/facebook/facebook.c Mon Dec 28 01:35:25 2015 -0500
@@ -584,6 +584,7 @@
{
FbApiUser *user;
FbData *fata = data;
+ gboolean active;
gchar tid[FB_ID_STRMAX];
gchar uid[FB_ID_STRMAX];
gint id;
@@ -598,8 +599,9 @@
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 (chat == NULL) {
+ if (!active) {
chat = purple_serv_got_joined_chat(gc, id, tid);
}
@@ -617,7 +619,7 @@
fb_buddy_add_nonfriend(acct, user);
}
- purple_chat_conversation_add_user(chat, uid, NULL, 0, TRUE);
+ purple_chat_conversation_add_user(chat, uid, NULL, 0, active);
}
}
@@ -1153,7 +1155,7 @@
id = fb_id_hash(&tid);
chat = purple_conversations_find_chat(gc, id);
- if (chat != NULL) {
+ if ((chat != NULL) && !purple_chat_conversation_has_left(chat)) {
purple_conversation_present(PURPLE_CONVERSATION(chat));
return;
}