File tree Expand file tree Collapse file tree
pyrogram/client/methods/chats Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1364,4 +1364,7 @@ langpack.getLanguage#6a596502 lang_pack:string lang_code:string = LangPackLangua
13641364folders.editPeerFolders#6847d0ab folder_peers:Vector<InputFolderPeer > = Updates ;
13651365folders.deleteFolder#1c295881 folder_id:int = Updates ;
13661366
1367+ // Ports
1368+ channels.exportInvite#c7560885 channel:InputChannel = ExportedChatInvite ;
1369+
13671370// LAYER 102
Original file line number Diff line number Diff line change @@ -52,11 +52,17 @@ def export_chat_invite_link(
5252 """
5353 peer = self .resolve_peer (chat_id )
5454
55- if isinstance (peer , ( types .InputPeerChannel , types . InputPeerChat ) ):
55+ if isinstance (peer , types .InputPeerChat ):
5656 return self .send (
5757 functions .messages .ExportChatInvite (
5858 peer = peer
5959 )
6060 ).link
61+ elif isinstance (peer , types .InputPeerChannel ):
62+ return self .send (
63+ functions .channels .ExportInvite (
64+ channel = peer
65+ )
66+ ).link
6167 else :
6268 raise ValueError ('The chat_id "{}" belongs to a user' .format (chat_id ))
You can’t perform that action at this time.
0 commit comments