@@ -334,6 +334,8 @@ def from_(self):
334334 "forward_from" : User ,
335335 "forward_from_chat" : Chat ,
336336 "forward_from_message_id" : int ,
337+ "forward_sender_name" : str ,
338+ "forward_signature" : str ,
337339 "forward_date" : int ,
338340 "reply_to_message" : _itself ,
339341 "text" : str ,
@@ -369,6 +371,7 @@ def from_(self):
369371 # Those are provided dynamically by self.forward_from
370372 "forward_from" : "_forward_from" ,
371373 "forward_from_chat" : "_forward_from_chat" ,
374+ "forward_sender_name" : "_forward_sender_name" ,
372375 }
373376 _check_equality_ = "message_id"
374377
@@ -390,12 +393,24 @@ def forward_from(self):
390393 """Get from where the message was forwarded"""
391394 # Provide either _forward_from or _forward_from_chat
392395 # _forward_from_chat is checked earlier because it's more correct
396+ # _forward_sender_name is returned if the original sender
397+ # has opted to hide his account
398+
393399 if self ._forward_from_chat is not None :
394400 return self ._forward_from_chat
395401
396402 if self ._forward_from is not None :
397403 return self ._forward_from
398404
405+ if self ._forward_sender_name is not None :
406+ return self ._forward_sender_name
407+
408+ @property
409+ def forward_hidden (self ):
410+ """Check if the original sender is hidden or not"""
411+
412+ return isinstance (self .forward_from , str )
413+
399414 @property
400415 def channel_post_author (self ):
401416 """Get the author of the channel post"""
0 commit comments