Skip to content

Commit

Permalink
pyrofork: pyrofork: Fix get_user_gifts
Browse files Browse the repository at this point in the history
Signed-off-by: Yasir Aris <[email protected]>
  • Loading branch information
yasirarism committed Jan 4, 2025
1 parent 0ad0c29 commit 334cf1c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions pyrogram/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,11 +358,11 @@ async def gift_code_filter(_, __, m: Message):
"""Filter messages that contain :obj:`~pyrogram.types.GiftCode` objects."""
# endregion

# region user_gift
async def user_gift_filter(_, __, m: Message):
return bool(m.user_gift)
user_gift = create(user_gift_filter)
"""Filter messages that contain :obj:`~pyrogram.types.UserGift` objects."""
# region star_gift_filter
async def star_gift_filter(_, __, m: Message):
return bool(m.star_gift)
star_gift = create(star_gift_filter)
"""Filter messages that contain :obj:`~pyrogram.types.StarGift` objects."""
# endregion

# region video_filter
Expand Down
2 changes: 1 addition & 1 deletion pyrogram/methods/business/get_user_gifts.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ async def get_user_gifts(
users = {u.id: u for u in r.users}

user_gifts = [
await types.UserGift._parse(self, gift, users)
await types.StarGift._parse(self, gift, users)
for gift in r.gifts
]

Expand Down

0 comments on commit 334cf1c

Please sign in to comment.