/pidgin/main: 25bab54aa2fa: facebook: fixed non-friend contacts ...
James Geboski
jgeboski at gmail.com
Sun Dec 20 18:41:00 EST 2015
Changeset: 25bab54aa2fa3fcfd2e65e544dbed2167dad8920
Author: James Geboski <jgeboski at gmail.com>
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");
More information about the Commits
mailing list