Merge pull request #50 from Lqlsoftware/master

Fix: Updating `last_message_id` after each batch
This commit is contained in:
DK 2020-12-11 10:06:29 +01:00 committed by GitHub
commit 6f09d1ebbd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View file

@ -93,3 +93,17 @@ All the downloaded media will be stored inside respective direcotry named in t
| photo | path/to/project/photo | | photo | path/to/project/photo |
| video | path/to/project/video | | video | path/to/project/video |
| voice | path/to/project/voice | | voice | path/to/project/voice |
## Proxy
`Socks5` proxy is supported in this project currently. To use it, simply create a `config.ini` file in the path of this project, and edit it with your proxy server info as follow:
```ini
[proxy]
enabled = True
hostname = 127.0.0.1
port = 1080
username =
password =
```
Then the proxy will automatically be enabled.

View file

@ -214,6 +214,8 @@ async def begin_import(config: dict, pagination_limit: int):
pagination_count = 0 pagination_count = 0
messages_list = [] messages_list = []
messages_list.append(message) messages_list.append(message)
config["last_read_message_id"] = last_read_message_id
update_config(config)
if messages_list: if messages_list:
last_read_message_id = await process_messages( last_read_message_id = await process_messages(
client, client,