Skip to content

Commit

Permalink
pyrofork: Fix IndexError error in Client.get_stories
Browse files Browse the repository at this point in the history
Signed-off-by: wulan17 <wulan17@nusantararom.org>
  • Loading branch information
wulan17 committed Jun 15, 2024
1 parent ac984cb commit a04a2f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyrogram/methods/users/get_stories.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ async def get_stories(

if is_iterable:
return types.List([await types.Story._parse(self, story, peer) for story in r.stories])
return await types.Story._parse(self, r.stories[0], peer)
return await types.Story._parse(self, r.stories[0], peer) if r.stories and len(r.stories) > 0 else None

0 comments on commit a04a2f2

Please sign in to comment.