From 2f2a381686150f60caf7adb9e66efdc73ae683e9 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Mon, 2 Apr 2018 12:14:22 +0200 Subject: [PATCH] Add extra GetDialogs step --- pyrogram/client/client.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py index 005fda4f..1da96844 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -914,6 +914,15 @@ class Client: offset_date = parse_dialogs(dialogs) log.info("Entities count: {}".format(len(self.peers_by_id))) + self.send( + functions.messages.GetDialogs( + 0, 0, types.InputPeerEmpty(), + self.DIALOGS_AT_ONCE, True + ) + ) + + log.info("Entities count: {}".format(len(self.peers_by_id))) + def resolve_peer(self, peer_id: int or str): """Use this method to get the *InputPeer* of a known *peer_id*.