mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-29 12:53:44 +03:00
Stop checking fwd_from or not out in message.edit
This commit is contained in:
parent
af81899bdc
commit
8114fb6c9b
|
@ -362,6 +362,17 @@ perform a separate request with no filter to fetch the total without filter (thi
|
||||||
library used to do).
|
library used to do).
|
||||||
|
|
||||||
|
|
||||||
|
Using message.edit will now raise an error if the message cannot be edited
|
||||||
|
--------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Before, calling ``message.edit()`` would completely ignore your attempt to edit a message if the
|
||||||
|
message had a forward header or was not outgoing. This is no longer the case. It is now the user's
|
||||||
|
responsibility to check for this.
|
||||||
|
|
||||||
|
However, most likely, you were already doing the right thing (or else you would've experienced a
|
||||||
|
"why is this not being edited", which you would most likely consider a bug rather than a feature).
|
||||||
|
|
||||||
|
|
||||||
The TelegramClient is no longer made out of mixins
|
The TelegramClient is no longer made out of mixins
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -762,9 +762,6 @@ class Message(ChatGetter, SenderGetter):
|
||||||
`telethon.client.messages.MessageMethods.edit_message`
|
`telethon.client.messages.MessageMethods.edit_message`
|
||||||
with both ``entity`` and ``message`` already set.
|
with both ``entity`` and ``message`` already set.
|
||||||
|
|
||||||
Returns `None` if the message was incoming,
|
|
||||||
or the edited `Message` otherwise.
|
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
This is different from `client.edit_message
|
This is different from `client.edit_message
|
||||||
|
@ -777,9 +774,6 @@ class Message(ChatGetter, SenderGetter):
|
||||||
This is generally the most desired and convenient behaviour,
|
This is generally the most desired and convenient behaviour,
|
||||||
and will work for link previews and message buttons.
|
and will work for link previews and message buttons.
|
||||||
"""
|
"""
|
||||||
if self.fwd_from or not self.out or not self._client:
|
|
||||||
return None # We assume self.out was patched for our chat
|
|
||||||
|
|
||||||
if 'link_preview' not in kwargs:
|
if 'link_preview' not in kwargs:
|
||||||
kwargs['link_preview'] = bool(self.web_preview)
|
kwargs['link_preview'] = bool(self.web_preview)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user