summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/json.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2015-09-01 21:17:14 +0000
committerRobert Pösel <robyer@seznam.cz>2015-09-01 21:17:14 +0000
commite596945743e029945b7fd8657de5d3f6c279d44b (patch)
tree23f3ed4bb01c2520c9c21051aed4ab8f37d4ea54 /protocols/FacebookRM/src/json.cpp
parent2d9f0998c93aaba8dc23a468a916316977582ae0 (diff)
Facebook: Add new option "Prefer real names instead of nicknames"
By disabling it you will see nicknames (if available) instead of real name of contacts. git-svn-id: http://svn.miranda-ng.org/main/trunk@15142 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/json.cpp')
-rw-r--r--protocols/FacebookRM/src/json.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp
index 99cebe36a0..4b4eebb131 100644
--- a/protocols/FacebookRM/src/json.cpp
+++ b/protocols/FacebookRM/src/json.cpp
@@ -146,6 +146,7 @@ void parseUser(const JSONNode &it, facebook_user *fbu)
return;
}
+ std::string alternateName = it["alternateName"].as_string(); // nickname
std::string name = it["name"].as_string();
std::string thumbSrc = it["thumbSrc"].as_string();
std::string vanity = it["vanity"].as_string(); // username
@@ -161,6 +162,8 @@ void parseUser(const JSONNode &it, facebook_user *fbu)
fbu->image_url = utils::text::slashu_to_utf8(thumbSrc);
if (!vanity.empty())
fbu->username = utils::text::slashu_to_utf8(vanity);
+ if (!alternateName.empty())
+ fbu->nick = alternateName;
if (gender) {
switch (gender) {