From 808bda6f8755f6c1eeca3301271103df97222067 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Fri, 22 May 2015 05:29:40 +0000 Subject: now nick is firstname + lastname git-svn-id: http://svn.miranda-ng.org/main/trunk@13739 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_profile.cpp | 35 ++++++++++++++++---------------- 1 file changed, 17 insertions(+), 18 deletions(-) (limited to 'protocols') diff --git a/protocols/SkypeWeb/src/skype_profile.cpp b/protocols/SkypeWeb/src/skype_profile.cpp index ea58c3f3f1..57b7c97b17 100644 --- a/protocols/SkypeWeb/src/skype_profile.cpp +++ b/protocols/SkypeWeb/src/skype_profile.cpp @@ -265,27 +265,26 @@ void CSkypeProto::UpdateProfileLastName(JSONNODE *root, MCONTACT hContact) void CSkypeProto::UpdateProfileDisplayName(JSONNODE *root, MCONTACT hContact) { - JSONNODE *node = json_get(root, "displayname"); - if (node == NULL) - node = json_get(root, "username"); - CMString displayname = ptrT(json_as_string(node)); - if (!displayname.IsEmpty() && displayname != "null") - setTString(hContact, "Nick", displayname); - 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); + 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 { + JSONNODE *node = json_get(root, "displayname"); + if (node == NULL) + node = json_get(root, "username"); + CMString displayname = ptrT(json_as_string(node)); + if (!displayname.IsEmpty() && displayname != "null") + setTString(hContact, "Nick", displayname); else delSetting(hContact, "Nick"); } - } void CSkypeProto::UpdateProfileGender(JSONNODE *root, MCONTACT hContact) -- cgit v1.2.3