mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 12:51:18 +00:00
Rename forward_from_name to forward_sender_name
This commit is contained in:
parent
ebacefb6e0
commit
cbc938931d
@ -79,7 +79,7 @@ class Message(PyrogramType, Update):
|
||||
forward_from (:obj:`User <pyrogram.User>`, *optional*):
|
||||
For forwarded messages, sender of the original message.
|
||||
|
||||
forward_from_name (``str``, *optional*):
|
||||
forward_sender_name (``str``, *optional*):
|
||||
For messages forwarded from users who have hidden their accounts, name of the user.
|
||||
|
||||
forward_from_chat (:obj:`Chat <pyrogram.Chat>`, *optional*):
|
||||
@ -267,7 +267,7 @@ class Message(PyrogramType, Update):
|
||||
# TODO: Add game missing field. Also invoice, successful_payment, connected_website
|
||||
|
||||
__slots__ = [
|
||||
"message_id", "date", "chat", "from_user", "forward_from", "forward_from_name", "forward_from_chat",
|
||||
"message_id", "date", "chat", "from_user", "forward_from", "forward_sender_name", "forward_from_chat",
|
||||
"forward_from_message_id", "forward_signature", "forward_date", "reply_to_message", "mentioned", "empty",
|
||||
"service", "media", "edit_date", "media_group_id", "author_signature", "text", "entities", "caption_entities",
|
||||
"audio", "document", "photo", "sticker", "animation", "game", "video", "voice", "video_note", "caption",
|
||||
@ -286,7 +286,7 @@ class Message(PyrogramType, Update):
|
||||
chat: Chat = None,
|
||||
from_user: User = None,
|
||||
forward_from: User = None,
|
||||
forward_from_name: str = None,
|
||||
forward_sender_name: str = None,
|
||||
forward_from_chat: Chat = None,
|
||||
forward_from_message_id: int = None,
|
||||
forward_signature: str = None,
|
||||
@ -348,7 +348,7 @@ class Message(PyrogramType, Update):
|
||||
self.chat = chat
|
||||
self.from_user = from_user
|
||||
self.forward_from = forward_from
|
||||
self.forward_from_name = forward_from_name
|
||||
self.forward_sender_name = forward_sender_name
|
||||
self.forward_from_chat = forward_from_chat
|
||||
self.forward_from_message_id = forward_from_message_id
|
||||
self.forward_signature = forward_signature
|
||||
@ -487,7 +487,7 @@ class Message(PyrogramType, Update):
|
||||
entities = list(filter(lambda x: x is not None, entities))
|
||||
|
||||
forward_from = None
|
||||
forward_from_name = None
|
||||
forward_sender_name = None
|
||||
forward_from_chat = None
|
||||
forward_from_message_id = None
|
||||
forward_signature = None
|
||||
@ -501,7 +501,7 @@ class Message(PyrogramType, Update):
|
||||
if forward_header.from_id:
|
||||
forward_from = User._parse(client, users[forward_header.from_id])
|
||||
elif forward_header.from_name:
|
||||
forward_from_name = forward_header.from_name
|
||||
forward_sender_name = forward_header.from_name
|
||||
else:
|
||||
forward_from_chat = Chat._parse_channel_chat(client, chats[forward_header.channel_id])
|
||||
forward_from_message_id = forward_header.channel_post
|
||||
@ -607,7 +607,7 @@ class Message(PyrogramType, Update):
|
||||
caption_entities=entities or None if media is not None else None,
|
||||
author_signature=message.post_author,
|
||||
forward_from=forward_from,
|
||||
forward_from_name=forward_from_name,
|
||||
forward_sender_name=forward_sender_name,
|
||||
forward_from_chat=forward_from_chat,
|
||||
forward_from_message_id=forward_from_message_id,
|
||||
forward_signature=forward_signature,
|
||||
|
Loading…
Reference in New Issue
Block a user