mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-06 07:14:50 +00:00
Finally remove ports from older schemas and fix export_chat_invite_link
This commit is contained in:
parent
c8c93b9ce6
commit
937987a361
1 changed files with 1 additions and 7 deletions
|
|
@ -57,17 +57,11 @@ class ExportChatInviteLink(BaseClient):
|
||||||
"""
|
"""
|
||||||
peer = self.resolve_peer(chat_id)
|
peer = self.resolve_peer(chat_id)
|
||||||
|
|
||||||
if isinstance(peer, types.InputPeerChat):
|
if isinstance(peer, (types.InputPeerChat, types.InputPeerChannel)):
|
||||||
return self.send(
|
return self.send(
|
||||||
functions.messages.ExportChatInvite(
|
functions.messages.ExportChatInvite(
|
||||||
peer=peer
|
peer=peer
|
||||||
)
|
)
|
||||||
).link
|
).link
|
||||||
elif isinstance(peer, types.InputPeerChannel):
|
|
||||||
return self.send(
|
|
||||||
functions.channels.ExportInvite(
|
|
||||||
channel=peer
|
|
||||||
)
|
|
||||||
).link
|
|
||||||
else:
|
else:
|
||||||
raise ValueError('The chat_id "{}" belongs to a user'.format(chat_id))
|
raise ValueError('The chat_id "{}" belongs to a user'.format(chat_id))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue