File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -57,13 +57,13 @@ async def resolve_peer(
5757 if not self .is_connected :
5858 raise ConnectionError ("Client has not been started yet" )
5959
60+ if peer_id in ("self" , "me" ):
61+ return raw .types .InputPeerSelf ()
62+
6063 try :
6164 return await self .storage .get_peer_by_id (peer_id )
6265 except KeyError :
6366 if isinstance (peer_id , str ):
64- if peer_id in ("self" , "me" ):
65- return raw .types .InputPeerSelf ()
66-
6767 peer_id = re .sub (r"[@+\s]" , "" , peer_id .lower ())
6868
6969 try :
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ async def main():
6161 if not is_authorized :
6262 await self .authorize ()
6363
64- if not await self .storage .is_bot () and self . takeout :
64+ if self . takeout and not await self .storage .is_bot ():
6565 self .takeout_id = (await self .invoke (raw .functions .account .InitTakeoutSession ())).id
6666 log .info ("Takeout session %s initiated" , self .takeout_id )
6767
You can’t perform that action at this time.
0 commit comments