File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -1019,7 +1019,10 @@ def editMessageText(self,
10191019 if reply_markup :
10201020 data ['disable_web_page_preview' ] = disable_web_page_preview
10211021 if reply_markup :
1022- data ['reply_markup' ] = reply_markup
1022+ if isinstance (reply_markup , ReplyMarkup ):
1023+ data ['reply_markup' ] = reply_markup .to_json ()
1024+ else :
1025+ data ['reply_markup' ] = reply_markup
10231026
10241027 result = request .post (url , data )
10251028
@@ -1066,7 +1069,10 @@ def editMessageCaption(self,
10661069 if inline_message_id :
10671070 data ['inline_message_id' ] = inline_message_id
10681071 if reply_markup :
1069- data ['reply_markup' ] = reply_markup
1072+ if isinstance (reply_markup , ReplyMarkup ):
1073+ data ['reply_markup' ] = reply_markup .to_json ()
1074+ else :
1075+ data ['reply_markup' ] = reply_markup
10701076
10711077 result = request .post (url , data )
10721078
@@ -1101,6 +1107,9 @@ def editMessageReplyMarkup(self,
11011107
11021108 url = '%s/editMessageReplyMarkup' % self .base_url
11031109
1110+ if isinstance (reply_markup , ReplyMarkup ):
1111+ reply_markup = reply_markup .to_json ()
1112+
11041113 data = {'reply_markup' : reply_markup }
11051114
11061115 if chat_id :
You can’t perform that action at this time.
0 commit comments