diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2016-07-07 11:44:27 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2016-07-07 11:44:27 +0000 |
commit | 320ae2c5255401fa7237307f59064d49b27282a4 (patch) | |
tree | f45d93de2d7b81645387dfebd308af54b028c5af /protocols/SkypeWeb/src/skype_proto.cpp | |
parent | 8f5d25a514c3c3bf0080accdfc39b5411ce068c0 (diff) |
SkypeWeb: status messages support
git-svn-id: http://svn.miranda-ng.org/main/trunk@17075 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_proto.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_proto.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp index fbe2cfd705..0059de176b 100644 --- a/protocols/SkypeWeb/src/skype_proto.cpp +++ b/protocols/SkypeWeb/src/skype_proto.cpp @@ -114,6 +114,31 @@ DWORD_PTR CSkypeProto::GetCaps(int type, MCONTACT) return 0;
}
+int CSkypeProto::SetAwayMsg(int, const TCHAR *msg)
+{
+ PushRequest(new SetStatusMsgRequest(msg ? T2Utf(msg) : "", li));
+ return 0;
+}
+
+HANDLE CSkypeProto::GetAwayMsg(MCONTACT hContact)
+{
+ PushRequest(new GetProfileRequest(li, Contacts[hContact]), [this, hContact](const NETLIBHTTPREQUEST *response)
+ {
+ if (!response || !response->pData)
+ return;
+
+ JSONNode root = JSONNode::parse(response->pData);
+
+ if (JSONNode &mood = root["mood"])
+ {
+ CMString str = mood.as_mstring();
+ this->ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)str.c_str());
+ }
+ this->ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, 0);
+ });
+ return (HANDLE)1;
+}
+
MCONTACT CSkypeProto::AddToList(int, PROTOSEARCHRESULT *psr)
{
debugLogA(__FUNCTION__);
|