diff options
author | George Hazan <ghazan@miranda.im> | 2020-06-03 20:26:55 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-06-03 20:26:55 +0300 |
commit | 1158dcf1d252d95c3fecf34c3d09bb21c20b812e (patch) | |
tree | 360acfc73f5ba9fca1e352f8d252e9e48b791526 /protocols/SkypeWeb/src/requests/contacts.h | |
parent | 59d3e0a8aa91452de46df3ae448f3cb499c5dce1 (diff) |
Skype: no need to use formatting where one can use string concatenation
Diffstat (limited to 'protocols/SkypeWeb/src/requests/contacts.h')
-rw-r--r-- | protocols/SkypeWeb/src/requests/contacts.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/protocols/SkypeWeb/src/requests/contacts.h b/protocols/SkypeWeb/src/requests/contacts.h index ea22bb49a0..ec0c3a4141 100644 --- a/protocols/SkypeWeb/src/requests/contacts.h +++ b/protocols/SkypeWeb/src/requests/contacts.h @@ -50,7 +50,7 @@ struct AddContactRequest : public AsyncHttpRequest AddHeader("Accept", "application/json");
JSONNode node;
- node << CHAR_PARAM("mri", CMStringA(::FORMAT, "8:", who).GetString()) << CHAR_PARAM("greeting", greeting);
+ node << CHAR_PARAM("mri", CMStringA(::FORMAT, "8:%s", who)) << CHAR_PARAM("greeting", greeting);
m_szParam = node.write().c_str();
}
};
@@ -58,10 +58,8 @@ struct AddContactRequest : public AsyncHttpRequest struct DeleteContactRequest : public AsyncHttpRequest
{
DeleteContactRequest(const char *who) :
- AsyncHttpRequest(REQUEST_DELETE, HOST_CONTACTS)
+ AsyncHttpRequest(REQUEST_DELETE, HOST_CONTACTS, "/contacts/v2/users/SELF/contacts/8%3A" + mir_urlEncode(who))
{
- m_szUrl.AppendFormat("/contacts/v2/users/SELF/contacts/8:%s", who);
-
AddHeader("Accept", "application/json");
}
};
|