From 173d82c142334fec7d45d3dd170bdaa81d11cc8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Thu, 29 May 2014 13:19:54 +0000 Subject: 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 --- protocols/FacebookRM/src/process.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'protocols/FacebookRM/src/process.cpp') 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; -- cgit v1.2.3