From eec1a98274a90e402685b0326ca5c46566606f91 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Tue, 21 Apr 2015 06:19:59 +0000 Subject: displayname fix git-svn-id: http://svn.miranda-ng.org/main/trunk@13001 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_profile.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'protocols/SkypeWeb/src') 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) -- cgit v1.2.3