/pidgin/main: 2a83ef0aed86: facebook: fixed nonfunctional group ...

James Geboski <[email protected]>
Newsgroups gmane.comp.gnome.gaim.cvs
Message-ID <[email protected]>
Changeset: 2a83ef0aed865b68e4412bfd7ec27854bea694bd
Author:	 James Geboski <[email protected]>
Date:	 2015-12-28 01:35 -0500
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/2a83ef0aed86

Description:

facebook: fixed nonfunctional group chat auto-rejoining

diffstat:

 libpurple/protocols/facebook/facebook.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (40 lines):

diff --git a/libpurple/protocols/facebook/facebook.c b/libpurple/protocols/facebook/facebook.c
--- a/libpurple/protocols/facebook/facebook.c
+++ b/libpurple/protocols/facebook/facebook.c
@@ -584,6 +584,7 @@ fb_cb_api_thread(FbApi *api, FbApiThread
 {
 	FbApiUser *user;
 	FbData *fata = data;
+	gboolean active;
 	gchar tid[FB_ID_STRMAX];
 	gchar uid[FB_ID_STRMAX];
 	gint id;
@@ -598,8 +599,9 @@ fb_cb_api_thread(FbApi *api, FbApiThread
 	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_cb_api_thread(FbApi *api, FbApiThread
 			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 @@ fb_chat_join(PurpleConnection *gc, GHash
 	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;
 	}

_______________________________________________
Commits mailing list
[email protected]
https://pidgin.im/cgi-bin/mailman/listinfo/commits
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.