mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-03-13 16:05:49 +03:00
Remove get_fwd_sender
This commit is contained in:
parent
9971145721
commit
96e8b0b840
|
@ -503,22 +503,6 @@ class Message:
|
||||||
|
|
||||||
return self._reply_message
|
return self._reply_message
|
||||||
|
|
||||||
async def get_fwd_sender(self):
|
|
||||||
"""
|
|
||||||
If the :tl:`Message` is a forwarded message, returns the :tl:`User`
|
|
||||||
or :tl:`Channel` who originally sent the message, or ``None``.
|
|
||||||
"""
|
|
||||||
if self._fwd_from_entity is None:
|
|
||||||
if getattr(self.original_message, 'fwd_from', None):
|
|
||||||
fwd = self.original_message.fwd_from
|
|
||||||
if fwd.from_id:
|
|
||||||
self._fwd_from_entity =\
|
|
||||||
await self._client.get_entity(fwd.from_id)
|
|
||||||
elif fwd.channel_id:
|
|
||||||
self._fwd_from_entity = await self._client.get_entity(
|
|
||||||
get_peer_id(types.PeerChannel(fwd.channel_id)))
|
|
||||||
return self._fwd_from_entity
|
|
||||||
|
|
||||||
async def respond(self, *args, **kwargs):
|
async def respond(self, *args, **kwargs):
|
||||||
"""
|
"""
|
||||||
Responds to the message (not as a reply). Shorthand for
|
Responds to the message (not as a reply). Shorthand for
|
||||||
|
|
Loading…
Reference in New Issue
Block a user