From cbc938931dbe222e3b46e1289b298b36f02e1e3e Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sun, 14 Apr 2019 20:34:46 +0200 Subject: [PATCH] Rename forward_from_name to forward_sender_name --- .../client/types/messages_and_media/message.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pyrogram/client/types/messages_and_media/message.py b/pyrogram/client/types/messages_and_media/message.py index 1ad00a7f..de2f51b1 100644 --- a/pyrogram/client/types/messages_and_media/message.py +++ b/pyrogram/client/types/messages_and_media/message.py @@ -79,7 +79,7 @@ class Message(PyrogramType, Update): forward_from (:obj:`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 `, *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,