diff options
Diffstat (limited to 'protocols/FacebookRM/src/process.cpp')
-rw-r--r-- | protocols/FacebookRM/src/process.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp index 7c4584f5f0..2f13369f5a 100644 --- a/protocols/FacebookRM/src/process.cpp +++ b/protocols/FacebookRM/src/process.cpp @@ -210,6 +210,16 @@ void FacebookProto::ProcessFriendList(void*) SaveName(hContact, fbu); } + // Update username + ptrA username(getStringA(hContact, FACEBOOK_KEY_USERNAME)); + if (!username || strcmp(username, fbu->username.c_str())) { + if (!fbu->username.empty()) + setString(hContact, FACEBOOK_KEY_USERNAME, fbu->username.c_str()); + else + delSetting(hContact, FACEBOOK_KEY_USERNAME); + } + + // Update contact type if (getByte(hContact, FACEBOOK_KEY_CONTACT_TYPE, 0) != CONTACT_FRIEND) { setByte(hContact, FACEBOOK_KEY_CONTACT_TYPE, CONTACT_FRIEND); // TODO: remove that popup and use "Contact added you" event? |