diff options
author | George Hazan <ghazan@miranda.im> | 2018-01-08 22:23:34 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-01-08 22:23:34 +0300 |
commit | 2f058ad0b6a6df7074f5ca05b37b8f4717d9eb13 (patch) | |
tree | ff4c48da3115ef514cd3a3e33f2633f8ff84b20f /protocols/FacebookRM | |
parent | 968eceb522b9dc380a4922e2f6b08857dec83bf4 (diff) |
code optimization
Diffstat (limited to 'protocols/FacebookRM')
-rw-r--r-- | protocols/FacebookRM/src/channel.cpp | 6 | ||||
-rw-r--r-- | protocols/FacebookRM/src/constants.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/protocols/FacebookRM/src/channel.cpp b/protocols/FacebookRM/src/channel.cpp index 320ced31b4..68936c44c0 100644 --- a/protocols/FacebookRM/src/channel.cpp +++ b/protocols/FacebookRM/src/channel.cpp @@ -27,10 +27,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. HttpRequest* facebook_client::channelRequest(facebook_client::Type type) { - HttpRequest *p = new HttpRequest(REQUEST_POST, FORMAT, - (type == PULL) ? FACEBOOK_SERVER_CHAT "/pull" : FACEBOOK_SERVER_CHAT "/active_ping", + HttpRequest *p = new HttpRequest(REQUEST_POST, FORMAT, FACEBOOK_SERVER_CHAT, chat_conn_num_.empty() ? "0" : chat_conn_num_.c_str(), - chat_channel_host_.c_str()); + chat_channel_host_.c_str(), + (type == PULL) ? "pull" : "active_ping"); if (type == PULL) { p->timeout = 65 * 1000; diff --git a/protocols/FacebookRM/src/constants.h b/protocols/FacebookRM/src/constants.h index 764e213286..5c500e1efc 100644 --- a/protocols/FacebookRM/src/constants.h +++ b/protocols/FacebookRM/src/constants.h @@ -37,7 +37,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define FACEBOOK_SERVER_REGULAR "www.facebook.com"
#define FACEBOOK_SERVER_MBASIC "mbasic.facebook.com"
#define FACEBOOK_SERVER_MOBILE "m.facebook.com"
-#define FACEBOOK_SERVER_CHAT "%s-%s.facebook.com"
+#define FACEBOOK_SERVER_CHAT "%s-%s.facebook.com/%s"
#define FACEBOOK_SERVER_LOGIN "www.facebook.com"
#define FACEBOOK_SERVER_APPS "apps.facebook.com"
#define FACEBOOK_SERVER_DOMAIN "facebook.com"
|