diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-05-29 13:19:54 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-05-29 13:19:54 +0000 |
commit | 173d82c142334fec7d45d3dd170bdaa81d11cc8e (patch) | |
tree | cb3dc94e03cac699e7803bcd217cdbfffbff7b91 /protocols/FacebookRM/src/process.cpp | |
parent | 18ddcdba70b8140905168cbf610906acb08e7037 (diff) |
Facebook: Added option for loading messages on opening message window; version bump
git-svn-id: http://svn.miranda-ng.org/main/trunk@9341 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/process.cpp')
-rw-r--r-- | protocols/FacebookRM/src/process.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp index 6f08cbed47..c588e6c192 100644 --- a/protocols/FacebookRM/src/process.cpp +++ b/protocols/FacebookRM/src/process.cpp @@ -441,12 +441,14 @@ void FacebookProto::LoadLastMessages(void *p) std::string id = utils::url::encode(std::string(item_id)); std::string type = isChat ? "thread_ids" : "user_ids"; + int count = getByte(FACEBOOK_KEY_MESSAGES_ON_OPEN_COUNT, DEFAULT_MESSAGES_ON_OPEN_COUNT); + count = min(count, FACEBOOK_MESSAGES_ON_OPEN_LIMIT); // request messages from thread data += "&messages[" + type + "][" + id; data += "][offset]=0"; data += "&messages[" + type + "][" + id; - data += "][limit]=30"; + data += "][limit]=" + utils::conversion::to_string(&count, UTILS_CONV_UNSIGNED_NUMBER); // request info about thread data += "&threads[" + type + "][0]=" + id; |