From b9b50bad94afe50073e0b85677538f0bcdaf74b3 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Tue, 11 Jun 2019 16:46:10 +0200 Subject: [PATCH] Fix get_users and get_contacts not returning pretty-printable lists --- pyrogram/client/methods/contacts/get_contacts.py | 2 +- pyrogram/client/methods/users/get_users.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyrogram/client/methods/contacts/get_contacts.py b/pyrogram/client/methods/contacts/get_contacts.py index 0c231670..8ca321dc 100644 --- a/pyrogram/client/methods/contacts/get_contacts.py +++ b/pyrogram/client/methods/contacts/get_contacts.py @@ -47,4 +47,4 @@ class GetContacts(BaseClient): time.sleep(e.x) else: log.info("Total contacts: {}".format(len(self.peers_by_phone))) - return [pyrogram.User._parse(self, user) for user in contacts.users] + return pyrogram.List(pyrogram.User._parse(self, user) for user in contacts.users) diff --git a/pyrogram/client/methods/users/get_users.py b/pyrogram/client/methods/users/get_users.py index 4ec0e893..f76e6802 100644 --- a/pyrogram/client/methods/users/get_users.py +++ b/pyrogram/client/methods/users/get_users.py @@ -56,7 +56,7 @@ class GetUsers(BaseClient): ) ) - users = [] + users = pyrogram.List() for i in r: users.append(pyrogram.User._parse(self, i))