summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/json.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-04-23 09:43:44 +0000
committerRobert Pösel <robyer@seznam.cz>2014-04-23 09:43:44 +0000
commit80562f021ec5144326fb940422bfbd974bb74732 (patch)
tree350a55451884c1f3ebab276ffedebf0c8e1a1592 /protocols/FacebookRM/src/json.cpp
parent775eca92d90a473e087d4598a8539b7842c631b0 (diff)
Facebook: Fixed loading own name and saving names improvements + hidden setting "NameAsNick" to not save real name as nickname (but it's pretty useless/ugly now)
git-svn-id: http://svn.miranda-ng.org/main/trunk@9054 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/json.cpp')
-rw-r--r--protocols/FacebookRM/src/json.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp
index f5a60b1466..e5c8150ebe 100644
--- a/protocols/FacebookRM/src/json.cpp
+++ b/protocols/FacebookRM/src/json.cpp
@@ -174,7 +174,7 @@ void parseUser(JSONNODE *it, facebook_user *fbu)
JSONNODE *name = json_get(it, "name");
JSONNODE *thumbSrc = json_get(it, "thumbSrc");
JSONNODE *gender = json_get(it, "gender");
- //JSONNODE *vanity = json_get(it, "vanity"); // username
+ JSONNODE *vanity = json_get(it, "vanity"); // username (this ISN'T nickname, but we will use it that way - but it's ugly and noone will use it)
//JSONNODE *uri = json_get(it, "uri"); // profile url
//JSONNODE *is_friend = json_get(it, "is_friend"); // e.g. "True"
//JSONNODE *type = json_get(it, "type"); // e.g. "friend" (classic contact) or "user" (disabled/deleted account)
@@ -184,6 +184,8 @@ void parseUser(JSONNODE *it, facebook_user *fbu)
fbu->real_name = utils::text::slashu_to_utf8(utils::text::special_expressions_decode(json_as_pstring(name)));
if (thumbSrc)
fbu->image_url = utils::text::slashu_to_utf8(utils::text::special_expressions_decode(json_as_pstring(thumbSrc)));
+ if (vanity)
+ fbu->nick = utils::text::slashu_to_utf8(utils::text::special_expressions_decode(json_as_pstring(vanity)));
if (gender)
switch (json_as_int(gender)) {