diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-04-21 06:19:59 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-04-21 06:19:59 +0000 |
commit | eec1a98274a90e402685b0326ca5c46566606f91 (patch) | |
tree | 3fc1db834a162f5a06a097131670ded33387ea3c /protocols/SkypeWeb | |
parent | 0f5b0cc733d78d30ea5075293cd28d438eb566a3 (diff) |
displayname fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@13001 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb')
-rw-r--r-- | protocols/SkypeWeb/src/skype_profile.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/protocols/SkypeWeb/src/skype_profile.cpp b/protocols/SkypeWeb/src/skype_profile.cpp index 386ced8bcd..942ec87abf 100644 --- a/protocols/SkypeWeb/src/skype_profile.cpp +++ b/protocols/SkypeWeb/src/skype_profile.cpp @@ -271,8 +271,21 @@ void CSkypeProto::UpdateProfileDisplayName(JSONNODE *root, MCONTACT hContact) CMString displayname = ptrT(json_as_string(node));
if (!displayname.IsEmpty() && displayname != "null")
setTString(hContact, "Nick", displayname);
- else
- delSetting(hContact, "Nick");
+ else{
+ ptrT firstname(getTStringA(hContact, "FirstName"));
+ ptrT lastname(getTStringA(hContact, "LastName"));
+ if (firstname) {
+ CMString nick = firstname;
+ if (lastname)
+ nick.AppendFormat(_T(" %s"), lastname);
+ setTString(hContact, "Nick", nick);
+ }
+ else if (lastname)
+ setTString(hContact, "Nick", lastname);
+ else
+ delSetting(hContact, "Nick");
+ }
+
}
void CSkypeProto::UpdateProfileGender(JSONNODE *root, MCONTACT hContact)
|