summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/communication.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-09-07 15:01:49 +0000
committerRobert Pösel <robyer@seznam.cz>2014-09-07 15:01:49 +0000
commit2f5d76f08d12f55ef28f7b56592b7e641d2cad26 (patch)
tree4031e59cb2861e30962eb48cadff31a1afec9544 /protocols/FacebookRM/src/communication.cpp
parentc03e34d73e955f6adcb2bcd40d5f524083d210c3 (diff)
Facebook: Fixed using hidden "Locale" option, now it is used in all requests
git-svn-id: http://svn.miranda-ng.org/main/trunk@10394 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/communication.cpp')
-rw-r--r--protocols/FacebookRM/src/communication.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp
index 70d0bd0c59..0d87cd2576 100644
--- a/protocols/FacebookRM/src/communication.cpp
+++ b/protocols/FacebookRM/src/communication.cpp
@@ -43,6 +43,9 @@ http::response facebook_client::flap(RequestType request_type, std::string* requ
url.append(choose_server(request_type, request_data, request_get_data));
url.append(choose_action(request_type, request_data, request_get_data));
+ if (!parent->m_locale.empty())
+ url += "&locale=" + parent->m_locale;
+
nlhr.szUrl = (char*)url.c_str();
nlhr.flags = NLHRF_HTTP11 | choose_security_level(request_type);
nlhr.headers = get_request_headers(nlhr.requestType, &nlhr.headersCount);
@@ -363,7 +366,7 @@ std::string facebook_client::choose_action(RequestType request_type, std::string
return "/checkpoint/?next";
case REQUEST_LOGOUT:
- return "/logout.php";
+ return "/logout.php?";
case REQUEST_HOME:
return "/profile.php?v=info";
@@ -402,7 +405,7 @@ std::string facebook_client::choose_action(RequestType request_type, std::string
case REQUEST_LOAD_FRIENDSHIPS:
{
- return "/friends/";
+ return "/friends/?";
}
case REQUEST_SEARCH:
@@ -456,7 +459,7 @@ std::string facebook_client::choose_action(RequestType request_type, std::string
case REQUEST_PAGES:
{
- return "/bookmarks/pages";
+ return "/bookmarks/pages?";
}
case REQUEST_NOTIFICATIONS:
@@ -500,7 +503,7 @@ std::string facebook_client::choose_action(RequestType request_type, std::string
return "/ajax/mercury/send_messages.php?__a=1";
case REQUEST_MESSAGE_SEND_INBOX:
- return "/ajax/messaging/send.php";
+ return "/ajax/messaging/send.php?";
case REQUEST_THREAD_INFO:
return "/ajax/mercury/thread_info.php?__a=1";
@@ -783,10 +786,6 @@ bool facebook_client::login(const char *username, const char *password)
data += "&email=" + utils::url::encode(username);
data += "&pass=" + utils::url::encode(password);
- ptrA locale(parent->getStringA(FACEBOOK_KEY_LOCALE));
- if (locale != NULL)
- data += "&locale=" + std::string(locale);
-
// Send validation
http::response resp = flap(REQUEST_LOGIN, &data);