2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-28 12:57:52 +00:00

Fix get_users and get_contacts not returning pretty-printable lists

This commit is contained in:
Dan 2019-06-11 16:46:10 +02:00
parent 1ee8487712
commit b9b50bad94
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -56,7 +56,7 @@ class GetUsers(BaseClient):
)
)
users = []
users = pyrogram.List()
for i in r:
users.append(pyrogram.User._parse(self, i))