mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 17:36:34 +03:00
Fix-up file to media calls from edit (from 3d72c10
)
This commit is contained in:
parent
916b379c03
commit
9d5344e90d
|
@ -753,7 +753,7 @@ class MessageMethods(UploadMethods, ButtonMethods, MessageParseMethods):
|
|||
|
||||
entity = await self.get_input_entity(entity)
|
||||
text, msg_entities = await self._parse_message_text(text, parse_mode)
|
||||
file_handle, media = await self._file_to_media(file)
|
||||
file_handle, media, image = await self._file_to_media(file)
|
||||
request = functions.messages.EditMessageRequest(
|
||||
peer=entity,
|
||||
id=utils.get_message_id(message),
|
||||
|
@ -764,7 +764,7 @@ class MessageMethods(UploadMethods, ButtonMethods, MessageParseMethods):
|
|||
reply_markup=self.build_reply_markup(buttons)
|
||||
)
|
||||
msg = self._get_response_message(request, await self(request), entity)
|
||||
await self._cache_media(msg, file, file_handle)
|
||||
await self._cache_media(msg, file, file_handle, image=image)
|
||||
return msg
|
||||
|
||||
async def delete_messages(self, entity, message_ids, *, revoke=True):
|
||||
|
|
Loading…
Reference in New Issue
Block a user