Skip to content

Commit

Permalink
Fix not sending all additional files if less captions than files were…
Browse files Browse the repository at this point in the history
… given
  • Loading branch information
Nachtalb committed Jul 24, 2023
1 parent 3e1026f commit 981101b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions reverse_image_search/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ async def _send_media_group(
clean_captions = [captions] + [None] * (len(files) - 1)
elif captions is None:
clean_captions = [None] * len(files)
elif len(captions) != len(files):
clean_captions = list(captions) + [None] * (len(files) - len(captions))
else:
clean_captions = captions

Expand Down

0 comments on commit 981101b

Please sign in to comment.