mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-06-19 19:46:41 +00:00
Fix DialogsIter not passing the client to the built objects
This commit is contained in:
parent
9d5344e90d
commit
598b9f25e1
@ -41,7 +41,7 @@ class _DialogsIter(RequestIter):
|
|||||||
|
|
||||||
messages = {}
|
messages = {}
|
||||||
for m in r.messages:
|
for m in r.messages:
|
||||||
m._finish_init(self, entities, None)
|
m._finish_init(self.client, entities, None)
|
||||||
messages[m.id] = m
|
messages[m.id] = m
|
||||||
|
|
||||||
for d in r.dialogs:
|
for d in r.dialogs:
|
||||||
@ -56,7 +56,7 @@ class _DialogsIter(RequestIter):
|
|||||||
peer_id = utils.get_peer_id(d.peer)
|
peer_id = utils.get_peer_id(d.peer)
|
||||||
if peer_id not in self.seen:
|
if peer_id not in self.seen:
|
||||||
self.seen.add(peer_id)
|
self.seen.add(peer_id)
|
||||||
cd = custom.Dialog(self, d, entities, messages)
|
cd = custom.Dialog(self.client, d, entities, messages)
|
||||||
if cd.dialog.pts:
|
if cd.dialog.pts:
|
||||||
self.client._channel_pts[cd.id] = cd.dialog.pts
|
self.client._channel_pts[cd.id] = cd.dialog.pts
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user