From a2f5418ba78530cd81aff19497fd44772e7bb42d Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Fri, 10 Apr 2015 14:56:20 +0000 Subject: SkypeWeb: GetInfo support; Small fixes. git-svn-id: http://svn.miranda-ng.org/main/trunk@12738 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_profile.cpp | 38 ++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 17 deletions(-) (limited to 'protocols/SkypeWeb/src/skype_profile.cpp') 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 -- cgit v1.2.3