summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/requests/status.h
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-03-24 19:38:19 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-03-24 19:38:19 +0000
commit2902d463ea9a35f7dd9b7ee5c887e10ed11f8542 (patch)
treecc526321622b2f397f1521a75195fd46b1fb2fd3 /protocols/SkypeWeb/src/requests/status.h
parent2f1b8c756066316c59be907bcd94a73cae5e3a7b (diff)
SkypeWeb: status improvements
git-svn-id: http://svn.miranda-ng.org/main/trunk@12493 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/requests/status.h')
-rw-r--r--protocols/SkypeWeb/src/requests/status.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/protocols/SkypeWeb/src/requests/status.h b/protocols/SkypeWeb/src/requests/status.h
index a8c40a492b..f37c936ec4 100644
--- a/protocols/SkypeWeb/src/requests/status.h
+++ b/protocols/SkypeWeb/src/requests/status.h
@@ -4,7 +4,7 @@
class SetStatusRequest : public HttpsRequest
{
public:
- SetStatusRequest(const char *regToken, bool status) :
+ SetStatusRequest(const char *regToken, int status) :
HttpsRequest(REQUEST_PUT, "client-s.gateway.messenger.live.com/v1/users/ME/presenceDocs/messagingService")
{
CMStringA auth = "registrationToken=";
@@ -18,9 +18,15 @@ public:
<< CHAR_VALUE("Origin", "https://web.skype.com")
<< CHAR_VALUE("Connection", "keep-alive");
- const char *data = status
- ? "{\"status\":\"Online\"}"
- : "{\"status\":\"Hidden\"}";
+ const char *data;
+ if (status == ID_STATUS_ONLINE)
+ data = "{\"status\":\"Online\"}";
+ else if (status == ID_STATUS_INVISIBLE)
+ data = "{\"status\":\"Hidden\"}";
+ else if (status == ID_STATUS_AWAY)
+ data = "{\"status\":\"Away\"}";
+ else
+ data = "{\"status\":\"Online\"}";
Body << VALUE(data);
}
};