diff options
author | matej <matej.vavrek@m2ms.sk> | 2018-01-23 22:00:30 +0100 |
---|---|---|
committer | matej <matej.vavrek@m2ms.sk> | 2018-01-23 22:00:30 +0100 |
commit | 6565ee811aac680bfcf4eba410bb88bc26a5d32f (patch) | |
tree | be2601290b4609eeb97dcee91eb6fce26f9350d6 /protocols | |
parent | 7855d20afb9fdc4c658bd85f76a9e9cb39b18665 (diff) |
Facebook: fixed missing last messages while loading history
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/FacebookRM/src/process.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp index 7b10449615..4a413b4035 100644 --- a/protocols/FacebookRM/src/process.cpp +++ b/protocols/FacebookRM/src/process.cpp @@ -353,7 +353,7 @@ void FacebookProto::LoadHistory(void *pParam) std::string lastMessageId; int loadedMessages = 0; int messagesPerBatch = messagesCount > 10000 ? 500 : 100; - for (int batch = 0; batch < messagesCount; batch += messagesPerBatch) { + for (int batch = 0, batchLimit = messagesCount + messagesPerBatch; batch < batchLimit; batch += messagesPerBatch) { if (!isOnline()) break; |