Skip to content

Commit

Permalink
Fix get_chat_photos
Browse files Browse the repository at this point in the history
  • Loading branch information
KurimuzonAkuma committed Sep 2, 2024
1 parent 82bb09c commit f7236fd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions compiler/docs/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ def get_title_list(s: str) -> list:
answer_web_app_query
answer_pre_checkout_query
create_invoice_link
refund_star_payment
""",
business="""
Business
Expand Down
7 changes: 6 additions & 1 deletion pyrogram/methods/users/get_chat_photos.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ async def get_chat_photos(
r.full_chat.chat_photo,
f"photo_{datetime.now().strftime('%Y-%m-%d_%H-%M-%S')}.mp4"
) or types.Photo._parse(self, r.full_chat.chat_photo) or []
current = [current]

if current:
current = [current]

if not self.me.is_bot:
r = await utils.parse_messages(
Expand Down Expand Up @@ -106,6 +108,9 @@ async def get_chat_photos(
else:
photos = []

if not photos:
return

current = 0

for photo in photos:
Expand Down

0 comments on commit f7236fd

Please sign in to comment.