1
0
mirror of https://github.com/fabianonline/telegram_backup.git synced 2024-11-22 16:56:16 +00:00

The check for the last message ID should ignore channels, because they have their own numbering system which could result in numbers larger than your own message IDs which leads to downloads of lots of empty messages which then block further backups.

This commit is contained in:
Fabian Schlenz 2016-08-31 06:55:22 +02:00
parent 5291b35f63
commit 34cca18009

View File

@ -103,8 +103,8 @@ public class DownloadManager {
dialog_limit);
logger.debug("Got {} dialogs", dialogs.getDialogs().size());
for (TLDialog d : dialogs.getDialogs()) {
if (d.getTopMessage() > max_message_id) {
logger.trace("Updating top message id: {} => {}", max_message_id, d.getTopMessage());
if (d.getTopMessage() > max_message_id && ! (d.getPeer() instanceof TLPeerChannel)) {
logger.trace("Updating top message id: {} => {}. Dialog type: {}", max_message_id, d.getTopMessage(), d.getPeer().getClass().getName());
max_message_id = d.getTopMessage();
}
}