There was an error while loading. Please reload this page.
1 parent 637fb3b commit 8013b57Copy full SHA for 8013b57
1 file changed
pyrogram/methods/chats/join_chat.py
@@ -65,10 +65,17 @@ async def join_chat(
65
elif isinstance(chat.chats[0], raw.types.Channel):
66
return types.Chat._parse_channel_chat(self, chat.chats[0])
67
else:
68
- chat = await self.invoke(
69
- raw.functions.channels.JoinChannel(
70
- channel=await self.resolve_peer(chat_id.split('/')[-1])
+ try:
+ chat = await self.invoke(
+ raw.functions.channels.JoinChannel(
71
+ channel=await self.resolve_peer(chat_id.split('/')[-1])
72
+ )
73
74
+ except AttributeError:
75
76
77
+ channel=await self.resolve_peer(chat_id)
78
79
)
- )
80
81
0 commit comments