diff options
author | Robert Pösel <robyer@seznam.cz> | 2016-04-17 15:08:58 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2016-04-17 15:08:58 +0000 |
commit | db6fa77e681f258d4454699c42cab0c1e61f5d2f (patch) | |
tree | 2e2fdcf409210599d080a53b73c89cbe37e7bd88 /protocols/FacebookRM/src/process.cpp | |
parent | 965ab314b6ca7f4e7f35060ebef14cd4157138de (diff) |
Facebook: Remove option "receive messages from inbox only"
It probably doesn't have any effect anymore. And if it still has any effect, plugin behaves like if it was disabled (receiving all messages).
Report any issues with the new FB's feature of "approving" messages from unknown people.
git-svn-id: http://svn.miranda-ng.org/main/trunk@16694 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/process.cpp')
-rw-r--r-- | protocols/FacebookRM/src/process.cpp | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp index a1f5938fee..c1986f2b7d 100644 --- a/protocols/FacebookRM/src/process.cpp +++ b/protocols/FacebookRM/src/process.cpp @@ -309,12 +309,7 @@ void FacebookProto::ProcessUnreadMessages(void*) facy.handle_entry("ProcessUnreadMessages"); - // receive messages from all folders by default, use hidden setting to receive only inbox messages - bool inboxOnly = getBool(FACEBOOK_KEY_INBOX_ONLY, 0); - - std::string data = "folders[0]=inbox"; - if (!inboxOnly) - data += "&folders[1]=other"; + std::string data = "folders[0]=inbox&folders[1]=other"; // TODO: I'm not sure if this is still valid/used on fb side (or it has any effect at all) data += "&client=mercury"; data += "&__user=" + facy.self_.user_id; data += "&fb_dtsg=" + facy.dtsg_; @@ -332,7 +327,7 @@ void FacebookProto::ProcessUnreadMessages(void*) std::vector<std::string> threads; facebook_json_parser* p = new facebook_json_parser(this); - p->parse_unread_threads(&resp.data, &threads, inboxOnly); + p->parse_unread_threads(&resp.data, &threads); delete p; ForkThread(&FacebookProto::ProcessUnreadMessage, new std::vector<std::string>(threads)); @@ -365,9 +360,6 @@ void FacebookProto::ProcessUnreadMessage(void *pParam) int offset = 0; int limit = 21; - // receive messages from all folders by default, use hidden setting to receive only inbox messages - bool inboxOnly = getBool(FACEBOOK_KEY_INBOX_ONLY, 0); - http::response resp; // TODO: First load info about amount of unread messages, then load exactly this amount for each thread @@ -405,7 +397,7 @@ void FacebookProto::ProcessUnreadMessage(void *pParam) std::map<std::string, facebook_chatroom*> chatrooms; facebook_json_parser* p = new facebook_json_parser(this); - p->parse_thread_messages(&resp.data, &messages, &chatrooms, false, inboxOnly); + p->parse_thread_messages(&resp.data, &messages, &chatrooms, false); delete p; for (std::map<std::string, facebook_chatroom*>::iterator it = chatrooms.begin(); it != chatrooms.end();) { @@ -526,7 +518,7 @@ void FacebookProto::LoadLastMessages(void *pParam) std::map<std::string, facebook_chatroom*> chatrooms; facebook_json_parser* p = new facebook_json_parser(this); - p->parse_thread_messages(&resp.data, &messages, &chatrooms, false, false); + p->parse_thread_messages(&resp.data, &messages, &chatrooms, false); delete p; // TODO: do something with this, chat is loading somewhere else... (in receiveMessages method right now) @@ -596,16 +588,11 @@ void FacebookProto::SyncThreads(void*) timestamp = daysBefore; } - // Receive messages from all folders by default, use hidden setting to receive only inbox messages - bool inboxOnly = getBool(FACEBOOK_KEY_INBOX_ONLY, 0); - // Get milli timestamp string for Facebook std::string time = utils::conversion::to_string((void*)×tamp, UTILS_CONV_TIME_T) + "000"; std::string data = "last_action_timestamp=" + time; - data += "&folders[0]=inbox"; - if (!inboxOnly) - data += "&folders[1]=other"; + data += "&folders[0]=inbox&folders[1]=other"; // TODO: I'm not sure if this is still valid/used on fb side (or it has any effect at all) data += "&client=mercury_sync"; data += "&__user=" + facy.self_.user_id; data += "&__dyn=" + facy.__dyn(); @@ -629,7 +616,7 @@ void FacebookProto::SyncThreads(void*) std::map<std::string, facebook_chatroom*> chatrooms; facebook_json_parser* p = new facebook_json_parser(this); - p->parse_thread_messages(&resp.data, &messages, &chatrooms, false, false); + p->parse_thread_messages(&resp.data, &messages, &chatrooms, false); delete p; ReceiveMessages(messages, true); @@ -1036,9 +1023,6 @@ void FacebookProto::ProcessMessages(void* data) return; } - // receive messages from all folders by default, use hidden setting to receive only inbox messages - bool inboxOnly = getBool(FACEBOOK_KEY_INBOX_ONLY, 0); - debugLogA("*** Starting processing messages"); CODE_BLOCK_TRY @@ -1046,7 +1030,7 @@ void FacebookProto::ProcessMessages(void* data) std::vector< facebook_message* > messages; facebook_json_parser* p = new facebook_json_parser(this); - p->parse_messages(resp, &messages, &facy.notifications, inboxOnly); + p->parse_messages(resp, &messages, &facy.notifications); delete p; ReceiveMessages(messages); |