We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 80c7a6e commit aaf0e82Copy full SHA for aaf0e82
1 file changed
pyrogram/client/methods/chats/join_chat.py
@@ -58,20 +58,9 @@ def join_chat(
58
elif isinstance(chat.chats[0], types.Channel):
59
return pyrogram.Chat._parse_channel_chat(self, chat.chats[0])
60
else:
61
- resolved_peer = self.send(
62
- functions.contacts.ResolveUsername(
63
- username=chat_id.lower().strip("@")
64
- )
65
66
-
67
- channel = types.InputPeerChannel(
68
- channel_id=resolved_peer.chats[0].id,
69
- access_hash=resolved_peer.chats[0].access_hash
70
71
72
chat = self.send(
73
functions.channels.JoinChannel(
74
- channel=channel
+ channel=self.resolve_peer(chat_id)
75
)
76
77
0 commit comments