File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,12 +49,16 @@ async def join_folder(
4949 """
5050 match = re .match (r"^(?:https?://)?(?:www\.)?(?:t(?:elegram)?\.(?:org|me|dog)/(?:addlist/|\+))([\w-]+)$" , link )
5151
52- if not match :
52+ if match :
53+ slug = match .group (1 )
54+ elif isinstance (link , str ):
55+ slug = link
56+ else :
5357 raise ValueError ("Invalid folder invite link" )
5458
5559 r = await self .invoke (
5660 raw .functions .chatlists .CheckChatlistInvite (
57- slug = match . group ( 1 )
61+ slug = slug
5862 )
5963 )
6064
@@ -65,7 +69,7 @@ async def join_folder(
6569
6670 await self .invoke (
6771 raw .functions .chatlists .JoinChatlistInvite (
68- slug = match . group ( 1 ) ,
72+ slug = slug ,
6973 peers = [
7074 await self .resolve_peer (utils .get_peer_id (id )) for id in peers
7175 ],
Original file line number Diff line number Diff line change @@ -55,12 +55,16 @@ async def leave_folder(
5555 """
5656 match = re .match (r"^(?:https?://)?(?:www\.)?(?:t(?:elegram)?\.(?:org|me|dog)/(?:addlist/|\+))([\w-]+)$" , link )
5757
58- if not match :
58+ if match :
59+ slug = match .group (1 )
60+ elif isinstance (link , str ):
61+ slug = link
62+ else :
5963 raise ValueError ("Invalid folder invite link" )
6064
6165 r = await self .invoke (
6266 raw .functions .chatlists .CheckChatlistInvite (
63- slug = match . group ( 1 )
67+ slug = slug
6468 )
6569 )
6670
You can’t perform that action at this time.
0 commit comments