summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/process.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/process.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/process.cpp')
-rw-r--r--protocols/FacebookRM/src/process.cpp19
1 files changed, 6 insertions, 13 deletions
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp
index 171341701c..fbbbb0c657 100644
--- a/protocols/FacebookRM/src/process.cpp
+++ b/protocols/FacebookRM/src/process.cpp
@@ -175,23 +175,16 @@ void FacebookProto::ProcessFriendList(void* data)
// Update gender
if (getByte(hContact, "Gender", 0) != fbu->gender)
setByte(hContact, "Gender", fbu->gender);
-
- // Update name
- DBVARIANT dbv;
- bool update_required = true;
-
- // TODO: remove in some future version?
+
+ // TODO: remove this in some future version?
+ // Remove old useless "RealName" field
ptrA realname(getStringA(hContact, "RealName"));
if (realname != NULL) {
delSetting(hContact, "RealName");
}
- else if (!getStringUtf(hContact, FACEBOOK_KEY_NICK, &dbv))
- {
- update_required = strcmp(dbv.pszVal, fbu->real_name.c_str()) != 0;
- db_free(&dbv);
- }
- if (update_required)
- {
+
+ // Update real name and nick
+ if (!fbu->real_name.empty()) {
SaveName(hContact, fbu);
}