diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-04-18 19:59:12 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-04-18 19:59:12 +0000 |
commit | b739a42cd7a428562844387ac3be305d0ce66b64 (patch) | |
tree | cbaf8886f24a04647d7f20c4b52d07edfed900f2 /protocols/SkypeWeb/src/requests/messages.h | |
parent | f81791fba68eb251a6425a40daa86854e42c6d4b (diff) |
SkypeWeb: Mark messages as readed rewritted.
git-svn-id: http://svn.miranda-ng.org/main/trunk@12921 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/requests/messages.h')
-rw-r--r-- | protocols/SkypeWeb/src/requests/messages.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/protocols/SkypeWeb/src/requests/messages.h b/protocols/SkypeWeb/src/requests/messages.h index 9a87361990..7706bd9ae2 100644 --- a/protocols/SkypeWeb/src/requests/messages.h +++ b/protocols/SkypeWeb/src/requests/messages.h @@ -98,13 +98,18 @@ public: class MarkMessageReadRequest : public HttpRequest
{
public:
- MarkMessageReadRequest(const char *regToken, LONGLONG msgId = 0, const char *server = SKYPE_ENDPOINTS_HOST) :
- HttpRequest(REQUEST_POST, FORMAT, "%s/v1/users/ME/conversations/ALL/messages/%lld/ack", server, msgId)
+ MarkMessageReadRequest(const char *username, const char *regToken, LONGLONG msgId = 0, LONGLONG msgTimestamp = 0, bool isChat = false, const char *server = SKYPE_ENDPOINTS_HOST) :
+ HttpRequest(REQUEST_PUT, FORMAT, "%s/v1/users/ME/conversations/%s:%s/properties?name=consumptionhorizon", server, !isChat?"8":"19", 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("{\"consumptionhorizon\":\"%lld;%lld000;%lld\"}", msgTimestamp, time(NULL), msgId);
+ Body << VALUE(data);
}
};
+
#endif //_SKYPE_REQUEST_MESSAGES_H_
|