Skip to content

Commit

Permalink
Ensure Forward Compatibility of Gift and Gifts (python-telegram-b…
Browse files Browse the repository at this point in the history
  • Loading branch information
Bibo-Joshi authored Jan 2, 2025
1 parent d0a6e51 commit 679d038
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions telegram/_gifts.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def de_json(cls, data: Optional[JSONDict], bot: Optional["Bot"] = None) -> Optio
return None

data["sticker"] = Sticker.de_json(data.get("sticker"), bot)
return cls(**data)
return super().de_json(data=data, bot=bot)


class Gifts(TelegramObject):
Expand Down Expand Up @@ -133,4 +133,4 @@ def de_json(cls, data: Optional[JSONDict], bot: Optional["Bot"] = None) -> Optio
return None

data["gifts"] = Gift.de_list(data.get("gifts"), bot)
return cls(**data)
return super().de_json(data=data, bot=bot)

0 comments on commit 679d038

Please sign in to comment.