diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2016-07-08 13:06:23 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2016-07-08 13:06:23 +0000 |
commit | ffa630d14ab6b2af9f6a28fb7932fd0917e90d53 (patch) | |
tree | fc7dd70c8da923c8320da7eaa44b9b009d1dfdd0 | |
parent | d8582c90a901c0582e65f378376d9e0a66a413aa (diff) |
SkypeWeb: fix status messages in clist
git-svn-id: http://svn.miranda-ng.org/main/trunk@17080 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | protocols/SkypeWeb/src/skype_contacts.cpp | 7 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_profile.cpp | 15 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_proto.h | 1 |
3 files changed, 6 insertions, 17 deletions
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);
|