Skip to content

Commit

Permalink
Fix get_upgraded_gift
Browse files Browse the repository at this point in the history
  • Loading branch information
KurimuzonAkuma committed Feb 1, 2025
1 parent 10038b3 commit 1c53109
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions pyrogram/methods/payments/get_upgraded_gift.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,5 @@ async def get_upgraded_gift(
)

users = {i.id: i for i in r.users}
chats = {i.id: i for i in r.chats}

return await types.Gift._parse_unique(self, r.gift, users, chats)
return await types.Gift._parse_unique(self, r.gift, users)
6 changes: 3 additions & 3 deletions pyrogram/types/messages_and_media/gift.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@ async def _parse_regular(
async def _parse_unique(
client,
star_gift: "raw.types.StarGiftUnique",
users: dict,
chats: dict
users: dict = {},
chats: dict = {}
) -> "Gift":
owner_id = utils.get_raw_peer_id(getattr(star_gift, "owner_id", None))

Expand Down Expand Up @@ -496,7 +496,7 @@ async def wear(self) -> bool:
"""Bound method *wear* of :obj:`~pyrogram.types.Gift`.
.. note::
This works for upgraded gifts only.
Use as a shortcut for:
Expand Down

0 comments on commit 1c53109

Please sign in to comment.