summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/SkypeWeb/src/skype_profile.cpp35
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)