diff options
Diffstat (limited to 'protocols/SkypeWeb/src/requests')
-rw-r--r-- | protocols/SkypeWeb/src/requests/capabilities.h | 2 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/requests/messages.h | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/protocols/SkypeWeb/src/requests/capabilities.h b/protocols/SkypeWeb/src/requests/capabilities.h index 912da59e34..573cec1673 100644 --- a/protocols/SkypeWeb/src/requests/capabilities.h +++ b/protocols/SkypeWeb/src/requests/capabilities.h @@ -34,7 +34,7 @@ public: #ifdef _WIN64
bitness = 64;
#endif
- data.AppendFormat("{\"id\":\"messagingService\",\"type\":\"EndpointPresenceDoc\",\"selfLink\":\"uri\",\"privateInfo\":{\"epname\":\"Miranda\"},\"publicInfo\":{\"capabilities\":\"\",\"typ\":125,\"skypeNameVersion\":\"Miranda NG Skype\",\"nodeInfo\":\"xx\",\"version\":\"%s x%d\"}}", MIRANDA_VERSION_STRING, bitness);
+ data.AppendFormat("{\"id\":\"messagingService\",\"type\":\"EndpointPresenceDoc\",\"selfLink\":\"uri\",\"privateInfo\":{\"epname\":\"Miranda\"},\"publicInfo\":{\"capabilities\":\"Audio|Video\",\"typ\":125,\"skypeNameVersion\":\"Miranda NG Skype\",\"nodeInfo\":\"xx\",\"version\":\"%s x%d\"}}", MIRANDA_VERSION_STRING, bitness);
Body <<
VALUE(data);
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_
|