mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-27 00:32:39 +00:00
Fix get_folders
This commit is contained in:
parent
72a7c84777
commit
6f99be7ae6
@ -82,4 +82,16 @@ class GetFolders:
|
||||
|
||||
folders = types.List(types.Folder._parse(self, folder, users, chats) for folder in raw_folders)
|
||||
|
||||
return folders if is_iterable or folder_ids is None else folders[0] if folders else None
|
||||
if not folders:
|
||||
return None
|
||||
|
||||
if folder_ids:
|
||||
if is_iterable:
|
||||
return folders
|
||||
else:
|
||||
for folder in folders:
|
||||
if folder.id == folder_ids:
|
||||
return folder
|
||||
return None
|
||||
|
||||
return folders
|
||||
|
Loading…
Reference in New Issue
Block a user