Skip to content

Commit 937987a

Browse files
committed
Finally remove ports from older schemas and fix export_chat_invite_link
1 parent c8c93b9 commit 937987a

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

pyrogram/client/methods/chats/export_chat_invite_link.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,11 @@ def export_chat_invite_link(
5757
"""
5858
peer = self.resolve_peer(chat_id)
5959

60-
if isinstance(peer, types.InputPeerChat):
60+
if isinstance(peer, (types.InputPeerChat, types.InputPeerChannel)):
6161
return self.send(
6262
functions.messages.ExportChatInvite(
6363
peer=peer
6464
)
6565
).link
66-
elif isinstance(peer, types.InputPeerChannel):
67-
return self.send(
68-
functions.channels.ExportInvite(
69-
channel=peer
70-
)
71-
).link
7266
else:
7367
raise ValueError('The chat_id "{}" belongs to a user'.format(chat_id))

0 commit comments

Comments
 (0)