mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-05 20:50:22 +03:00
fix #329
This commit is contained in:
parent
bec5f9fb89
commit
cf7934e4b2
|
@ -253,7 +253,8 @@ class TelegramClient(TelegramBareClient):
|
|||
if limit is None:
|
||||
limit = float('inf')
|
||||
|
||||
dialogs = {} # Use Dialog.top_message as identifier to avoid dupes
|
||||
i = 0
|
||||
dialogs = {} # Use sequence numeration as identifier to avoid dupes
|
||||
messages = {} # Used later for sorting TODO also return these?
|
||||
entities = {}
|
||||
while len(dialogs) < limit:
|
||||
|
@ -268,7 +269,8 @@ class TelegramClient(TelegramBareClient):
|
|||
break
|
||||
|
||||
for d in r.dialogs:
|
||||
dialogs[d.top_message] = d
|
||||
dialogs[i] = d
|
||||
i += 1
|
||||
for m in r.messages:
|
||||
messages[m.id] = m
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user