From 2f058ad0b6a6df7074f5ca05b37b8f4717d9eb13 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 8 Jan 2018 22:23:34 +0300 Subject: code optimization --- protocols/FacebookRM/src/channel.cpp | 6 +++--- protocols/FacebookRM/src/constants.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'protocols/FacebookRM/src') 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 . 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 . #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" -- cgit v1.2.3