From ffa630d14ab6b2af9f6a28fb7932fd0917e90d53 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Fri, 8 Jul 2016 13:06:23 +0000 Subject: SkypeWeb: fix status messages in clist git-svn-id: http://svn.miranda-ng.org/main/trunk@17080 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_contacts.cpp | 7 ++++++- protocols/SkypeWeb/src/skype_profile.cpp | 15 --------------- protocols/SkypeWeb/src/skype_proto.h | 1 - 3 files changed, 6 insertions(+), 17 deletions(-) (limited to 'protocols') diff --git a/protocols/SkypeWeb/src/skype_contacts.cpp b/protocols/SkypeWeb/src/skype_contacts.cpp index 174cc0e7fd..c4aecd4825 100644 --- a/protocols/SkypeWeb/src/skype_contacts.cpp +++ b/protocols/SkypeWeb/src/skype_contacts.cpp @@ -176,7 +176,7 @@ void CSkypeProto::LoadContactsInfo(const NETLIBHTTPREQUEST *response) { UpdateProfileCountry(item, hContact); UpdateProfileCity(item, hContact); - UpdateProfileStatusMessage(item, hContact); + UpdateProfileXStatusMessage(item, hContact); } } } @@ -249,6 +249,11 @@ void CSkypeProto::LoadContactList(const NETLIBHTTPREQUEST *response) if (last_name) setTString(hContact, "LastName", last_name); + if (item["mood"]) + { + db_set_s(hContact, "CList", "StatusMsg", ptrA(RemoveHtml(ptrA(mir_utf8decodeA(item["mood"].as_string().c_str()))))); + } + SetAvatarUrl(hContact, avatar_url); ReloadAvatarInfo(hContact); diff --git a/protocols/SkypeWeb/src/skype_profile.cpp b/protocols/SkypeWeb/src/skype_profile.cpp index 0a9bffa133..a7f5d33608 100644 --- a/protocols/SkypeWeb/src/skype_profile.cpp +++ b/protocols/SkypeWeb/src/skype_profile.cpp @@ -419,18 +419,6 @@ void CSkypeProto::UpdateProfilePhoneOffice(const JSONNode &root, MCONTACT hConta delSetting(hContact, "CompanyPhone"); } -void CSkypeProto::UpdateProfileStatusMessage(const JSONNode &root, MCONTACT hContact) -{ - if (hContact == NULL) - return; - - CMString province = root["mood"].as_mstring(); - if (!province.IsEmpty() && province != "null") - db_set_ts(hContact, "CList", "StatusMsg", province); - else - db_unset(hContact, "CList", "StatusMsg"); -} - void CSkypeProto::UpdateProfileXStatusMessage(const JSONNode &root, MCONTACT hContact) { CMString province = root["richMood"].as_mstring(); @@ -481,9 +469,6 @@ void CSkypeProto::LoadProfile(const NETLIBHTTPREQUEST *response) UpdateProfilePhoneMobile(root, hContact); UpdateProfilePhoneHome(root, hContact); UpdateProfilePhoneOffice(root, hContact); - UpdateProfileStatusMessage(root, hContact); //richMood UpdateProfileAvatar(root, hContact); - - setString(hContact, "StatusMsg", root["mood"].as_string().c_str()); } diff --git a/protocols/SkypeWeb/src/skype_proto.h b/protocols/SkypeWeb/src/skype_proto.h index e42ddd0008..94f0aa43a6 100644 --- a/protocols/SkypeWeb/src/skype_proto.h +++ b/protocols/SkypeWeb/src/skype_proto.h @@ -265,7 +265,6 @@ private: void UpdateProfilePhoneMobile(const JSONNode &root, MCONTACT hContact = NULL); void UpdateProfilePhoneHome(const JSONNode &root, MCONTACT hContact = NULL); void UpdateProfilePhoneOffice(const JSONNode &root, MCONTACT hContact = NULL); - void UpdateProfileStatusMessage(const JSONNode &root, MCONTACT hContact = NULL); void UpdateProfileXStatusMessage(const JSONNode &root, MCONTACT hContact = NULL); void UpdateProfileAvatar(const JSONNode &root, MCONTACT hContact = NULL); -- cgit v1.2.3