Compare commits

...

2 Commits

Author SHA1 Message Date
Hinrich Mahler 314f87ec44 Bump version to v12.6.1 2020-04-11 09:53:29 +02:00
Bibo-Joshi 4bbcd51ef5 Fix serialization of reply_markups (#1889) 2020-04-11 09:44:40 +02:00
4 changed files with 22 additions and 4 deletions
+10
View File
@@ -2,6 +2,16 @@
Changelog
=========
Version 12.6.1
==============
*Released 2020-04-11*
**Bug fixes:**
- Fix serialization of ``reply_markup`` in media messages (`#1889`_)
.. _`#1889`: https://github.com/python-telegram-bot/python-telegram-bot/pull/1889
Version 12.6
============
*Released 2020-04-10*
+1 -1
View File
@@ -60,7 +60,7 @@ author = u'Leandro Toledo'
# The short X.Y version.
version = '12.6' # telegram.__version__[:3]
# The full version, including alpha/beta/rc tags.
release = '12.6' # telegram.__version__
release = '12.6.1' # telegram.__version__
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
+10 -2
View File
@@ -163,7 +163,9 @@ class Bot(TelegramObject):
if reply_markup is not None:
if isinstance(reply_markup, ReplyMarkup):
data['reply_markup'] = reply_markup.to_dict()
# We need to_json() instead of to_dict() here, because reply_markups may be
# attached to media messages, which aren't json dumped by utils.request
data['reply_markup'] = reply_markup.to_json()
else:
data['reply_markup'] = reply_markup
@@ -3404,6 +3406,8 @@ class Bot(TelegramObject):
if contains_masks is not None:
data['contains_masks'] = contains_masks
if mask_position is not None:
# We need to_json() instead of to_dict() here, because we're sending a media
# message here, which isn't json dumped by utils.request
data['mask_position'] = mask_position.to_json()
data.update(kwargs)
@@ -3472,6 +3476,8 @@ class Bot(TelegramObject):
if tgs_sticker is not None:
data['tgs_sticker'] = tgs_sticker
if mask_position is not None:
# We need to_json() instead of to_dict() here, because we're sending a media
# message here, which isn't json dumped by utils.request
data['mask_position'] = mask_position.to_json()
data.update(kwargs)
@@ -3726,7 +3732,9 @@ class Bot(TelegramObject):
if reply_markup:
if isinstance(reply_markup, ReplyMarkup):
data['reply_markup'] = reply_markup.to_dict()
# We need to_json() instead of to_dict() here, because reply_markups may be
# attached to media messages, which aren't json dumped by utils.request
data['reply_markup'] = reply_markup.to_json()
else:
data['reply_markup'] = reply_markup
+1 -1
View File
@@ -17,4 +17,4 @@
# You should have received a copy of the GNU Lesser Public License
# along with this program. If not, see [http://www.gnu.org/licenses/].
__version__ = '12.6'
__version__ = '12.6.1'