diff options
Diffstat (limited to 'protocols/SkypeWeb/src/requests')
-rw-r--r-- | protocols/SkypeWeb/src/requests/contacts.h | 6 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/requests/status.h | 14 |
2 files changed, 13 insertions, 7 deletions
diff --git a/protocols/SkypeWeb/src/requests/contacts.h b/protocols/SkypeWeb/src/requests/contacts.h index 9a41c1d8fe..21bf1d56a5 100644 --- a/protocols/SkypeWeb/src/requests/contacts.h +++ b/protocols/SkypeWeb/src/requests/contacts.h @@ -18,8 +18,8 @@ public: class GetContactsInfoRequest : public HttpsPostRequest
{
public:
- GetContactsInfoRequest(const char *token, const LIST<char> &skypenames, const char *skypename = "self") :
- HttpsPostRequest("api.skype.com/users/%s/contacts/profiles", skypename)
+ GetContactsInfoRequest(const char *token, const LIST<char> &skypenames/*, const char *skypename = "self"*/) :
+ HttpsPostRequest("api.skype.com/users/self/contacts/profiles"/*, skypename*/)
{
Headers
<< CHAR_VALUE("X-Skypetoken", token)
@@ -68,4 +68,4 @@ public: }
};
-#endif //_SKYPE_REQUEST_CONTACTS_H_
+#endif //_SKYPE_REQUEST_CONTACTS_H_
\ No newline at end of file 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);
}
};
|