summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_profile.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-04-10 14:56:20 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-04-10 14:56:20 +0000
commita2f5418ba78530cd81aff19497fd44772e7bb42d (patch)
tree0a210bb8b2fe511242bbf186efa277f33144482f /protocols/SkypeWeb/src/skype_profile.cpp
parenta95fb39f8e85ad7c2feb30b9797f292d02e07c18 (diff)
SkypeWeb: GetInfo support; Small fixes.
git-svn-id: http://svn.miranda-ng.org/main/trunk@12738 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_profile.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_profile.cpp38
1 files changed, 21 insertions, 17 deletions
diff --git a/protocols/SkypeWeb/src/skype_profile.cpp b/protocols/SkypeWeb/src/skype_profile.cpp
index 7ff989f610..3290041229 100644
--- a/protocols/SkypeWeb/src/skype_profile.cpp
+++ b/protocols/SkypeWeb/src/skype_profile.cpp
@@ -464,24 +464,28 @@ void CSkypeProto::LoadProfile(const NETLIBHTTPREQUEST *response)
JSONROOT root(response->pData);
if (root == NULL)
return;
+ ptrA username(mir_t2a(ptrT(json_as_string(json_get(root, "username")))));
+ MCONTACT hContact = NULL;
+ if (!IsMe(username))
+ hContact = GetContact(username);
- UpdateProfileFirstName(root);
- UpdateProfileLastName(root);
- UpdateProfileDisplayName(root);
- UpdateProfileGender(root);
- UpdateProfileBirthday(root);
- UpdateProfileCountry(root);
- UpdateProfileState(root);
- UpdateProfileCity(root);
- UpdateProfileLanguage(root);
- UpdateProfileHomepage(root);
- UpdateProfileAbout(root);
+ UpdateProfileFirstName(root, hContact);
+ UpdateProfileLastName(root, hContact);
+ UpdateProfileDisplayName(root, hContact);
+ UpdateProfileGender(root, hContact);
+ UpdateProfileBirthday(root, hContact);
+ UpdateProfileCountry(root, hContact);
+ UpdateProfileState(root, hContact);
+ UpdateProfileCity(root, hContact);
+ UpdateProfileLanguage(root, hContact);
+ UpdateProfileHomepage(root, hContact);
+ UpdateProfileAbout(root, hContact);
//jobtitle
- UpdateProfileEmails(root);
- UpdateProfilePhoneMobile(root);
- UpdateProfilePhoneHome(root);
- UpdateProfilePhoneOffice(root);
- UpdateProfileStatusMessage(root);
+ UpdateProfileEmails(root, hContact);
+ UpdateProfilePhoneMobile(root, hContact);
+ UpdateProfilePhoneHome(root, hContact);
+ UpdateProfilePhoneOffice(root, hContact);
+ UpdateProfileStatusMessage(root, hContact);
//richMood
- UpdateProfileAvatar(root);
+ UpdateProfileAvatar(root, hContact);
} \ No newline at end of file