summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/json.cpp
diff options
context:
space:
mode:
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) {