Fix send_message with buttons not always returning ReplyMarkup

This commit is contained in:
Lonami Exo 2019-01-12 12:53:01 +01:00
parent d31aaa5d0d
commit fbf7f75b00
2 changed files with 3 additions and 2 deletions

View File

@ -518,7 +518,8 @@ class MessageMethods(UploadMethods, ButtonMethods, MessageParseMethods):
date=result.date, date=result.date,
out=result.out, out=result.out,
media=result.media, media=result.media,
entities=result.entities entities=result.entities,
reply_markup=request.reply_markup
) )
message._finish_init(self, {}, entity) message._finish_init(self, {}, entity)
return message return message

View File

@ -648,7 +648,7 @@ class Message(ChatGetter, SenderGetter, TLObject, abc.ABC):
kwargs['link_preview'] = bool(self.web_preview) kwargs['link_preview'] = bool(self.web_preview)
if 'buttons' not in kwargs: if 'buttons' not in kwargs:
kwargs['buttons'] = self.buttons kwargs['buttons'] = self.reply_markup
return await self._client.edit_message( return await self._client.edit_message(
await self.get_input_chat(), self.id, await self.get_input_chat(), self.id,