/soc/2015/jgeboski/facebook: 5a13f12c6fbd: facebook: fixed the s...

James Geboski <[email protected]>
Newsgroups gmane.comp.gnome.gaim.cvs
Message-ID <[email protected]>
Changeset: 5a13f12c6fbd477414843176fc0b03fe35963610
Author:	 James Geboski <[email protected]>
Date:	 2015-06-23 21:54 -0400
Branch:	 facebook
URL: https://hg.pidgin.im/soc/2015/jgeboski/facebook/rev/5a13f12c6fbd

Description:

facebook: fixed the setting of buddy statuses

diffstat:

 libpurple/protocols/facebook/facebook.c |  13 ++-----------
 1 files changed, 2 insertions(+), 11 deletions(-)

diffs (38 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
@@ -222,9 +222,7 @@ fb_cb_api_presence(FbApi *api, GSList *p
 	gchar uid[FB_ID_STRMAX];
 	GSList *l;
 	PurpleAccount *acct;
-	PurpleBuddy *bdy;
 	PurpleConnection *gc;
-	PurplePresence *ppres;
 	PurpleStatusPrimitive pstat;
 
 	gc = fb_data_get_connection(fata);
@@ -233,22 +231,15 @@ fb_cb_api_presence(FbApi *api, GSList *p
 	for (l = press; l != NULL; l = l->next) {
 		pres = l->data;
 
-		FB_ID_TO_STR(pres->uid, uid);
-		bdy = purple_blist_find_buddy(acct, uid);
-		ppres = purple_buddy_get_presence(bdy);
-
-		if (G_UNLIKELY(bdy == NULL)) {
-			continue;
-		}
-
 		if (pres->active) {
 			pstat = PURPLE_STATUS_AVAILABLE;
 		} else {
 			pstat = PURPLE_STATUS_OFFLINE;
 		}
 
+		FB_ID_TO_STR(pres->uid, uid);
 		statid = purple_primitive_get_id_from_type(pstat);
-		purple_presence_switch_status(ppres, statid);
+		purple_protocol_got_user_status(acct, uid, statid, NULL);
 	}
 }
 

_______________________________________________
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.