diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-22 05:29:40 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-22 05:29:40 +0000 |
commit | 808bda6f8755f6c1eeca3301271103df97222067 (patch) | |
tree | 54537919c9da264c6d54c7fbd048df810113c171 /protocols/SkypeWeb | |
parent | 1889d396b05de1fb84902c61a2c1a80d86d54b04 (diff) |
now nick is firstname + lastname
git-svn-id: http://svn.miranda-ng.org/main/trunk@13739 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb')
-rw-r--r-- | protocols/SkypeWeb/src/skype_profile.cpp | 35 |
1 files changed, 17 insertions, 18 deletions
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)
|