@@ -234,6 +234,9 @@ class Message(Object, Update):
234234 left_chat_member (:obj:`~pyrogram.types.User`, *optional*):
235235 A member was removed from the group, information about them (this member may be the bot itself).
236236
237+ old_chat_title (``str``, *optional*):
238+ The supergroup has been migrated from a group with the specified title.
239+
237240 new_chat_title (``str``, *optional*):
238241 A chat title was changed to this value.
239242
@@ -507,6 +510,7 @@ def __init__(
507510 location : "types.Location" = None ,
508511 new_chat_members : list ["types.User" ] = None ,
509512 left_chat_member : "types.User" = None ,
513+ old_chat_title : str = None ,
510514 new_chat_title : str = None ,
511515 new_chat_photo : "types.Photo" = None ,
512516 delete_chat_photo : bool = None ,
@@ -623,6 +627,7 @@ def __init__(
623627 self .dice = dice
624628 self .new_chat_members = new_chat_members
625629 self .left_chat_member = left_chat_member
630+ self .old_chat_title = old_chat_title
626631 self .new_chat_title = new_chat_title
627632 self .new_chat_photo = new_chat_photo
628633 self .delete_chat_photo = delete_chat_photo
@@ -757,6 +762,7 @@ async def _parse(
757762
758763 new_chat_members = None
759764 left_chat_member = None
765+ old_chat_title = None
760766 new_chat_title = None
761767 delete_chat_photo = None
762768 migrate_to_chat_id = None
@@ -812,6 +818,7 @@ async def _parse(
812818 new_chat_members = [types .User ._parse (client , users [utils .get_raw_peer_id (message .from_id )])]
813819 service_type = enums .MessageServiceType .NEW_CHAT_MEMBERS
814820 chat_join_type = enums .ChatJoinType .BY_LINK
821+ from_user = types .User ._parse (client , users .get (action .inviter_id , None ))
815822 elif isinstance (action , raw .types .MessageActionChatJoinedByRequest ):
816823 new_chat_members = [types .User ._parse (client , users [utils .get_raw_peer_id (message .from_id )])]
817824 service_type = enums .MessageServiceType .NEW_CHAT_MEMBERS
@@ -829,12 +836,16 @@ async def _parse(
829836 migrate_to_chat_id = action .channel_id
830837 service_type = enums .MessageServiceType .MIGRATE_TO_CHAT_ID
831838 elif isinstance (action , raw .types .MessageActionChannelMigrateFrom ):
839+ old_chat_title = action .title
832840 migrate_from_chat_id = action .chat_id
833841 service_type = enums .MessageServiceType .MIGRATE_FROM_CHAT_ID
834842 elif isinstance (action , raw .types .MessageActionChatCreate ):
843+ new_chat_members = [types .User ._parse (client , users [user ]) for user in action .users ]
844+ new_chat_title = action .title
835845 group_chat_created = True
836846 service_type = enums .MessageServiceType .GROUP_CHAT_CREATED
837847 elif isinstance (action , raw .types .MessageActionChannelCreate ):
848+ new_chat_title = action .title
838849 if chat .type == enums .ChatType .SUPERGROUP :
839850 supergroup_chat_created = True
840851 service_type = enums .MessageServiceType .SUPERGROUP_CHAT_CREATED
@@ -857,7 +868,7 @@ async def _parse(
857868 elif isinstance (action , raw .types .MessageActionInviteToGroupCall ):
858869 video_chat_participants_invited = types .VideoChatParticipantsInvited ._parse (client , action , users )
859870 service_type = enums .MessageServiceType .VIDEO_CHAT_PARTICIPANTS_INVITED
860- elif isinstance (action , raw .types .MessageActionWebViewDataSentMe ):
871+ elif isinstance (action , ( raw .types .MessageActionWebViewDataSentMe , raw . types . MessageActionWebViewDataSent ) ):
861872 web_app_data = types .WebAppData ._parse (action )
862873 service_type = enums .MessageServiceType .WEB_APP_DATA
863874 elif isinstance (action , raw .types .MessageActionGiveawayLaunch ):
@@ -1090,6 +1101,7 @@ async def _parse(
10901101 service = service_type ,
10911102 new_chat_members = new_chat_members ,
10921103 left_chat_member = left_chat_member ,
1104+ old_chat_title = old_chat_title ,
10931105 new_chat_title = new_chat_title ,
10941106 new_chat_photo = new_chat_photo ,
10951107 delete_chat_photo = delete_chat_photo ,
0 commit comments