summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/requests/messages.h
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-04-06 18:47:07 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-04-06 18:47:07 +0000
commit7056dd6d9d9fc9eefad716272e24682f55ace117 (patch)
treef0b2fce90f470802d3bbf9e459f9897a1cbecc48 /protocols/SkypeWeb/src/requests/messages.h
parent993f6a525a2236ed3a3b1491213150c4a893426c (diff)
SkypeWeb:
- added receiving actions (/me) - fixed <undef> nick in private chats git-svn-id: http://svn.miranda-ng.org/main/trunk@12638 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/requests/messages.h')
-rw-r--r--protocols/SkypeWeb/src/requests/messages.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/protocols/SkypeWeb/src/requests/messages.h b/protocols/SkypeWeb/src/requests/messages.h
index 81a0d12b92..c7aa5347c8 100644
--- a/protocols/SkypeWeb/src/requests/messages.h
+++ b/protocols/SkypeWeb/src/requests/messages.h
@@ -19,6 +19,24 @@ public:
}
};
+class SendActionRequest : public HttpRequest
+{
+public:
+ SendActionRequest(const char *regToken, const char *username, time_t timestamp, const char *message, const char *server = "client-s.gateway.messenger.live.com") :
+ HttpRequest(REQUEST_POST, FORMAT, "%s/v1/users/ME/conversations/8:%s/messages", server, username)
+ {
+ Headers
+ << CHAR_VALUE("Accept", "application/json, text/javascript")
+ << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", regToken)
+ << CHAR_VALUE("Content-Type", "application/json; charset = UTF-8");
+
+ CMStringA data;
+ data.AppendFormat("{\"clientmessageid\":\"%lld\",\"content\":\"%s %s\",\"messagetype\":\"RichText\",\"contenttype\":\"text\",\"skypeemoteoffset\":\"%d\"}", timestamp, username, message, (int)(mir_strlen(username) + 1));
+
+ Body << VALUE(data);
+ }
+};
+
class SendTypingRequest : public HttpRequest
{
public: