Skip to content

Store bot in PreCheckoutQuery. #953

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ The following wonderful people contributed directly or indirectly to this projec
- `bimmlerd <https://github.com/bimmlerd>`_
- `d-qoi <https://github.com/d-qoi>`_
- `daimajia <https://github.com/daimajia>`_
- `Daniel Reed <https://github.com/nmlorg>`_
- `Eli Gao <https://github.com/eligao>`_
- `ErgoZ Riftbit Vaper <https://github.com/ergoz>`_
- `Eugene Lisitsky <https://github.com/lisitsky>`_
Expand Down
2 changes: 1 addition & 1 deletion telegram/payment/precheckoutquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def de_json(cls, data, bot):
data['from_user'] = User.de_json(data.pop('from'), bot)
data['order_info'] = OrderInfo.de_json(data.get('order_info'), bot)

return cls(**data)
return cls(bot=bot, **data)

def to_dict(self):
data = super(PreCheckoutQuery, self).to_dict()
Expand Down
1 change: 1 addition & 0 deletions tests/test_precheckoutquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def test_de_json(self, bot):
}
pre_checkout_query = PreCheckoutQuery.de_json(json_dict, bot)

assert pre_checkout_query.bot is bot
assert pre_checkout_query.id == self.id
assert pre_checkout_query.invoice_payload == self.invoice_payload
assert pre_checkout_query.shipping_option_id == self.shipping_option_id
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy