/pidgin/main: 25bab54aa2fa: facebook: fixed non-friend contacts ...

James Geboski <[email protected]>
Newsgroups gmane.comp.gnome.gaim.cvs
Message-ID <[email protected]>
Changeset: 25bab54aa2fa3fcfd2e65e544dbed2167dad8920
Author:	 James Geboski <[email protected]>
Date:	 2015-12-20 18:40 -0500
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/25bab54aa2fa

Description:

facebook: fixed non-friend contacts showing as buddies

diffstat:

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

diffs (25 lines):

diff --git a/libpurple/protocols/facebook/api.c b/libpurple/protocols/facebook/api.c
--- a/libpurple/protocols/facebook/api.c
+++ b/libpurple/protocols/facebook/api.c
@@ -1954,6 +1954,8 @@ fb_api_cb_contacts(PurpleHttpConnection 
 	fb_json_values_add(values, FB_JSON_TYPE_STR, TRUE,
 	                   "$.graph_api_write_id");
 	fb_json_values_add(values, FB_JSON_TYPE_STR, TRUE,
+	                   "$.represented_profile.friendship_status");
+	fb_json_values_add(values, FB_JSON_TYPE_STR, TRUE,
 	                   "$.represented_profile.id");
 	fb_json_values_add(values, FB_JSON_TYPE_STR, TRUE,
 	                   "$.structured_name.text");
@@ -1965,6 +1967,12 @@ fb_api_cb_contacts(PurpleHttpConnection 
 	while (fb_json_values_update(values, &err)) {
 		g_free(writeid);
 		writeid = fb_json_values_next_str_dup(values, NULL);
+		str = fb_json_values_next_str(values, NULL);
+
+		if (!purple_strequal(str, "ARE_FRIENDS")) {
+			continue;
+		}
+
 		user = fb_api_user_dup(NULL, FALSE);
 		str = fb_json_values_next_str(values, "0");
 

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