mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 12:59:46 +00:00
Support async def in sessions (#1013)
This commit is contained in:
@@ -21,6 +21,7 @@ from ..tl.types import (
|
||||
MsgNewDetailedInfo, NewSessionCreated, MsgDetailedInfo, MsgsStateReq,
|
||||
MsgsStateInfo, MsgsAllInfo, MsgResendReq, upload
|
||||
)
|
||||
from ..utils import AsyncClassWrapper
|
||||
|
||||
__log__ = logging.getLogger(__name__)
|
||||
|
||||
@@ -213,7 +214,7 @@ class MTProtoSender:
|
||||
await authenticator.do_authentication(plain)
|
||||
|
||||
if self._auth_key_callback:
|
||||
self._auth_key_callback(state.auth_key)
|
||||
await self._auth_key_callback(state.auth_key)
|
||||
|
||||
break
|
||||
except (SecurityError, AssertionError) as e:
|
||||
|
Reference in New Issue
Block a user