From 0249374384bf08c60815ba20e243ce7784ffaa1f Mon Sep 17 00:00:00 2001 From: Fabian Schlenz Date: Fri, 25 Nov 2016 21:23:45 +0100 Subject: [PATCH] Testing putting multiple GetMessages requests into one RpcQuery. References #35. --- .../telegram_backup/DownloadManager.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/main/java/de/fabianonline/telegram_backup/DownloadManager.java b/src/main/java/de/fabianonline/telegram_backup/DownloadManager.java index 53866c5..f33c70f 100644 --- a/src/main/java/de/fabianonline/telegram_backup/DownloadManager.java +++ b/src/main/java/de/fabianonline/telegram_backup/DownloadManager.java @@ -33,6 +33,8 @@ import com.github.badoualy.telegram.tl.api.*; import com.github.badoualy.telegram.tl.api.upload.TLFile; import com.github.badoualy.telegram.tl.exception.RpcErrorException; import com.github.badoualy.telegram.tl.api.request.TLRequestUploadGetFile; +import com.github.badoualy.telegram.tl.core.TLMethod; +import com.github.badoualy.telegram.tl.api.request.*; import org.slf4j.LoggerFactory; import org.slf4j.Logger; @@ -169,6 +171,26 @@ public class DownloadManager { prog.onMessageDownloadStart(ids.size()); boolean has_seen_flood_wait_message = false; + /// Testing + List methods = new LinkedList<>(); + int a = 0; + while(ids.size()>0 && a<5) { + a++; + TLIntVector vector = new TLIntVector(); + for (int i=0; i responses = client.executeRpcQueries(methods); + for(TLObject obj : responses) { + System.out.println(obj.getClass().getName()); + } + System.exit(0); + /// Testing ends + logger.debug("Entering download loop"); while (ids.size()>0) { logger.trace("Loop");