summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-01-08 22:41:39 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-01-08 22:41:39 +0300
commit2fea2fa6d9c3d95822d55d93325bbb7f47f0e80d (patch)
treeb3f668e3808f4e1181196ce240f076166b2c850c
parent8b2d266f82516771cff401605aad14fecda85f97 (diff)
more useless mir_urlEncode
-rw-r--r--protocols/FacebookRM/src/contacts.cpp2
-rw-r--r--protocols/FacebookRM/src/history.cpp3
-rw-r--r--protocols/FacebookRM/src/login.cpp4
-rw-r--r--protocols/FacebookRM/src/messages.cpp6
-rw-r--r--protocols/FacebookRM/src/notifications.cpp2
-rw-r--r--protocols/FacebookRM/src/utils.cpp9
6 files changed, 11 insertions, 15 deletions
diff --git a/protocols/FacebookRM/src/contacts.cpp b/protocols/FacebookRM/src/contacts.cpp
index dfab64a60f..a224978f0e 100644
--- a/protocols/FacebookRM/src/contacts.cpp
+++ b/protocols/FacebookRM/src/contacts.cpp
@@ -695,7 +695,7 @@ HttpRequest* facebook_client::userInfoRequest(const LIST<char> &userIds)
for (int i = 0; i < userIds.getCount(); i++) {
CMStringA id(::FORMAT, "ids[%i]", i);
- p->Body << CHAR_PARAM(id, ptrA(mir_urlEncode(userIds[i])));
+ p->Body << CHAR_PARAM(id, userIds[i]);
}
p->Body
diff --git a/protocols/FacebookRM/src/history.cpp b/protocols/FacebookRM/src/history.cpp
index b34fbb534e..454e3e8593 100644
--- a/protocols/FacebookRM/src/history.cpp
+++ b/protocols/FacebookRM/src/history.cpp
@@ -42,11 +42,10 @@ HttpRequest* facebook_client::threadInfoRequest(bool isChat, const char *id, con
if (id_.substr(0, 3) == "id.")
id_ = id_.substr(3);
}
- ptrA idEncoded(mir_urlEncode(id_.c_str()));
JSONNode root, o0, query_params;
query_params
- << CHAR_PARAM("id", idEncoded)
+ << CHAR_PARAM("id", id_.c_str())
<< INT_PARAM("message_limit", (limit == -1) ? 50 : limit)
<< INT_PARAM("load_messages", 0)
<< BOOL_PARAM("load_read_receipts", false);
diff --git a/protocols/FacebookRM/src/login.cpp b/protocols/FacebookRM/src/login.cpp
index 1c585dda3d..5d88d81a56 100644
--- a/protocols/FacebookRM/src/login.cpp
+++ b/protocols/FacebookRM/src/login.cpp
@@ -44,8 +44,8 @@ HttpRequest* facebook_client::loginRequest(const char *username, const char *pas
p->Body
<< INT_PARAM("persistent", 1)
- << CHAR_PARAM("email", ptrA(mir_urlEncode(username)))
- << CHAR_PARAM("pass", ptrA(mir_urlEncode(password)))
+ << CHAR_PARAM("email", username)
+ << CHAR_PARAM("pass", password)
<< CHAR_PARAM("lgndim", "eyJ3IjoxOTIwLCJoIjoxMDgwLCJhdyI6MTgzNCwiYWgiOjEwODAsImMiOjMyfQ==") // means base64 encoded: {"w":1920,"h":1080,"aw":1834,"ah":1080,"c":32}
<< bodyData; // additional data parsed from form
diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp
index 5147feefc0..9970d9be2c 100644
--- a/protocols/FacebookRM/src/messages.cpp
+++ b/protocols/FacebookRM/src/messages.cpp
@@ -296,12 +296,10 @@ HttpRequest* facebook_client::sendTypingRequest(const char *userId, bool isChat,
p->Url << INT_PARAM("dpr", 1);
- ptrA idEncoded(mir_urlEncode(userId));
-
p->Body
<< INT_PARAM("typ", isTyping ? 1 : 0)
- << CHAR_PARAM("to", isChat ? "" : idEncoded)
- << CHAR_PARAM("thread", idEncoded)
+ << CHAR_PARAM("to", isChat ? "" : userId)
+ << CHAR_PARAM("thread", userId)
<< CHAR_PARAM("source", "mercury-chat")
<< CHAR_PARAM("__user", self_.user_id.c_str())
<< CHAR_PARAM("__dyn", __dyn())
diff --git a/protocols/FacebookRM/src/notifications.cpp b/protocols/FacebookRM/src/notifications.cpp
index a4f5ae5925..5904eece86 100644
--- a/protocols/FacebookRM/src/notifications.cpp
+++ b/protocols/FacebookRM/src/notifications.cpp
@@ -64,7 +64,7 @@ HttpRequest* facebook_client::markNotificationReadRequest(const char *id)
<< CHAR_PARAM("__dyn", __dyn())
<< CHAR_PARAM("__req", __req())
<< CHAR_PARAM("__rev", __rev())
- << CHAR_PARAM("alert_ids%5B0%5D", ptrA(mir_urlEncode(id)));
+ << CHAR_PARAM("alert_ids%5B0%5D", id);
return p;
}
diff --git a/protocols/FacebookRM/src/utils.cpp b/protocols/FacebookRM/src/utils.cpp
index 3e14cc930f..75f26165de 100644
--- a/protocols/FacebookRM/src/utils.cpp
+++ b/protocols/FacebookRM/src/utils.cpp
@@ -59,7 +59,7 @@ HttpRequest* facebook_client::linkScraperRequest(status_data *status)
p->Url
<< INT_PARAM("__a", 1)
<< INT_PARAM("composerurihash", 2)
- << CHAR_PARAM("scrape_url", ptrA(mir_urlEncode(status->url.c_str())));
+ << CHAR_PARAM("scrape_url", status->url.c_str());
p->Body
<< CHAR_PARAM("fb_dtsg", dtsg_.c_str())
@@ -119,7 +119,6 @@ HttpRequest* facebook_client::sharePostRequest(status_data *status, const char *
p->Url << INT_PARAM("__a", 1);
- ptrA text(mir_urlEncode(status->text.c_str()));
p->Body
<< CHAR_PARAM("fb_dtsg", dtsg_.c_str())
<< CHAR_PARAM("__dyn", __dyn())
@@ -127,8 +126,8 @@ HttpRequest* facebook_client::sharePostRequest(status_data *status, const char *
<< CHAR_PARAM("ttstamp", ttstamp_.c_str())
<< CHAR_PARAM("__user", status->isPage && !status->user_id.empty() ? status->user_id.c_str() : self_.user_id.c_str())
<< CHAR_PARAM("xhpc_targetid", status->user_id.empty() ? self_.user_id.c_str() : status->user_id.c_str())
- << CHAR_PARAM("xhpc_message", text)
- << CHAR_PARAM("xhpc_message_text", text)
+ << CHAR_PARAM("xhpc_message", status->text.c_str())
+ << CHAR_PARAM("xhpc_message_text", status->text.c_str())
<< CHAR_PARAM("xhpc_context", "profile")
<< INT_PARAM("xhpc_ismeta", 1)
<< INT_PARAM("xhpc_timeline", 1)
@@ -140,7 +139,7 @@ HttpRequest* facebook_client::sharePostRequest(status_data *status, const char *
p->Body << CHAR_PARAM("audience[0][value]", get_privacy_type().c_str());
if (!status->place.empty())
- p->Body << CHAR_PARAM("composertags_place_name", ptrA(mir_urlEncode(status->place.c_str())));
+ p->Body << CHAR_PARAM("composertags_place_name", status->place.c_str());
// Status with users
for (std::vector<facebook_user*>::size_type i = 0; i < status->users.size(); i++) {