summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/requests
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-05-29 23:45:19 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-05-29 23:45:19 +0300
commitf63eb2bfc28dff8bbf9d56dd57b2bc6b53487f56 (patch)
treef2c2a56e945fc1ea44d5f22f95cd397a0d251fa2 /protocols/SkypeWeb/src/requests
parent133826f5022c5b0d9beca9285d66afcb604e2fc4 (diff)
Skype:
- fixes #829; - massive code cleaning
Diffstat (limited to 'protocols/SkypeWeb/src/requests')
-rw-r--r--protocols/SkypeWeb/src/requests/avatars.h2
-rw-r--r--protocols/SkypeWeb/src/requests/contacts.h2
-rw-r--r--protocols/SkypeWeb/src/requests/messages.h4
3 files changed, 4 insertions, 4 deletions
diff --git a/protocols/SkypeWeb/src/requests/avatars.h b/protocols/SkypeWeb/src/requests/avatars.h
index 97b5460416..5f7c1ee36e 100644
--- a/protocols/SkypeWeb/src/requests/avatars.h
+++ b/protocols/SkypeWeb/src/requests/avatars.h
@@ -31,7 +31,7 @@ class SetAvatarRequest : public HttpRequest
{
public:
SetAvatarRequest(const PBYTE data, size_t dataSize, const char *szMime, LoginInfo &li) :
- HttpRequest(REQUEST_PUT, FORMAT, "api.skype.com/users/%s/profile/avatar", CMStringA(li.szSkypename.get()).MakeLower().c_str())
+ HttpRequest(REQUEST_PUT, FORMAT, "api.skype.com/users/%s/profile/avatar", li.szSkypename.MakeLower().c_str())
{
Headers
<< CHAR_VALUE("X-Skypetoken", li.api.szToken)
diff --git a/protocols/SkypeWeb/src/requests/contacts.h b/protocols/SkypeWeb/src/requests/contacts.h
index b2a93290e1..372b0b07e9 100644
--- a/protocols/SkypeWeb/src/requests/contacts.h
+++ b/protocols/SkypeWeb/src/requests/contacts.h
@@ -31,7 +31,7 @@ public:
<< CHAR_VALUE("Accept", "application/json");
}*/
GetContactListRequest(LoginInfo &li, const char *filter) :
- HttpRequest(REQUEST_GET, FORMAT, "contacts.skype.com/contacts/v1/users/%s/contacts", CMStringA(li.szSkypename).MakeLower().GetBuffer())
+ HttpRequest(REQUEST_GET, FORMAT, "contacts.skype.com/contacts/v1/users/%s/contacts", li.szSkypename.MakeLower().GetBuffer())
{
if (filter != NULL)
{
diff --git a/protocols/SkypeWeb/src/requests/messages.h b/protocols/SkypeWeb/src/requests/messages.h
index 71b4153d36..2b3b798db5 100644
--- a/protocols/SkypeWeb/src/requests/messages.h
+++ b/protocols/SkypeWeb/src/requests/messages.h
@@ -52,7 +52,7 @@ public:
<< CHAR_VALUE("Content-Type", "application/json; charset=UTF-8");
CMStringA content;
- content.AppendFormat("%s %s", li.szSkypename, message);
+ content.AppendFormat("%s %s", li.szSkypename.c_str(), message);
JSONNode node;
node
@@ -60,7 +60,7 @@ public:
<< JSONNode("messagetype", "RichText")
<< JSONNode("contenttype", "text")
<< JSONNode("content", content)
- << JSONNode("skypeemoteoffset", (int)(mir_strlen(li.szSkypename) + 1));
+ << JSONNode("skypeemoteoffset", li.szSkypename.GetLength() + 1);
Body << VALUE(node.write().c_str());
}