mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-07-12 17:12:23 +03:00
Return custom User from sign_in/sign_up
This commit is contained in:
parent
1029c38d7e
commit
5c6fdf9a71
|
@ -297,7 +297,7 @@ async def _update_session_state(self, user, save=True):
|
||||||
)
|
)
|
||||||
|
|
||||||
self._phone_code_hash = None
|
self._phone_code_hash = None
|
||||||
return user
|
return _custom.User._new(self, user)
|
||||||
|
|
||||||
|
|
||||||
async def _replace_session_state(self, *, save=True, **changes):
|
async def _replace_session_state(self, *, save=True, **changes):
|
||||||
|
|
|
@ -15,4 +15,6 @@ from ._custom import (
|
||||||
InlineResults,
|
InlineResults,
|
||||||
QRLogin,
|
QRLogin,
|
||||||
ParticipantPermissions,
|
ParticipantPermissions,
|
||||||
|
Chat,
|
||||||
|
User,
|
||||||
)
|
)
|
||||||
|
|
|
@ -12,3 +12,5 @@ from .inlineresult import InlineResult
|
||||||
from .inlineresults import InlineResults
|
from .inlineresults import InlineResults
|
||||||
from .qrlogin import QRLogin
|
from .qrlogin import QRLogin
|
||||||
from .participantpermissions import ParticipantPermissions
|
from .participantpermissions import ParticipantPermissions
|
||||||
|
from .chat import Chat
|
||||||
|
from .user import User
|
||||||
|
|
|
@ -11,7 +11,7 @@ from .inputfile import InputFile
|
||||||
from .inputmessage import InputMessage
|
from .inputmessage import InputMessage
|
||||||
from .button import build_reply_markup
|
from .button import build_reply_markup
|
||||||
from ..._misc import utils, helpers, tlobject, markdown, html
|
from ..._misc import utils, helpers, tlobject, markdown, html
|
||||||
from ... import _tl, _misc
|
from ..._sessions.types import Entity
|
||||||
|
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
|
@ -181,7 +181,6 @@ class User:
|
||||||
self._user = user
|
self._user = user
|
||||||
|
|
||||||
self._full = None
|
self._full = None
|
||||||
raise RuntimeError('self._i_need_to_include_participant_info')
|
|
||||||
|
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user