diff --git a/telegram/payment/shippingquery.py b/telegram/payment/shippingquery.py index a5b819150..5f6178526 100644 --- a/telegram/payment/shippingquery.py +++ b/telegram/payment/shippingquery.py @@ -64,7 +64,7 @@ class ShippingQuery(TelegramObject): data['from_user'] = User.de_json(data.pop('from'), bot) data['shipping_address'] = ShippingAddress.de_json(data.get('shipping_address'), bot) - return cls(**data) + return cls(bot=bot, **data) def answer(self, *args, **kwargs): """Shortcut for:: diff --git a/tests/test_shippingquery.py b/tests/test_shippingquery.py index e92301020..d88bfa84e 100644 --- a/tests/test_shippingquery.py +++ b/tests/test_shippingquery.py @@ -50,6 +50,7 @@ class TestShippingQuery(object): assert shipping_query.invoice_payload == self.invoice_payload assert shipping_query.from_user == self.from_user assert shipping_query.shipping_address == self.shipping_address + assert shipping_query.bot == bot def test_to_dict(self, shipping_query): shipping_query_dict = shipping_query.to_dict()