diff options
-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)
|