diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py index a9517458..1add1790 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -2345,6 +2345,9 @@ class Client: progress (``int``, optional): Progress of the upload process. + Returns: + On success, True is returned. + Raises: :class:`Error ` """ @@ -2420,12 +2423,15 @@ class Client: disable_web_page_preview (``bool``, optional): Disables link previews for links in this message. + Returns: + On success, the edited :obj:`Message ` is returned. + Raises: :class:`Error ` """ style = self.html if parse_mode.lower() == "html" else self.markdown - return self.send( + r = self.send( functions.messages.EditMessage( peer=self.resolve_peer(chat_id), id=message_id, @@ -2434,6 +2440,13 @@ class Client: ) ) + for i in r.updates: + if isinstance(i, (types.UpdateEditMessage, types.UpdateEditChannelMessage)): + users = {i.id: i for i in r.users} + chats = {i.id: i for i in r.chats} + + return message_parser.parse_message(self, i.message, users, chats) + def edit_message_caption(self, chat_id: int or str, message_id: int,