Lonami Exo
d5cdda28c5
Change QrLogin to reduce room for error
2022-03-02 13:00:41 +01:00
Lonami Exo
ab150bf457
Fix get_tos usage of expiry
...
expires is actually a timestamp, not seconds
2022-03-02 13:00:41 +01:00
Lonami Exo
0bc598c121
Stop auto-accepting ToS on sign_up, add get_tos instead
2022-02-17 12:40:38 +01:00
Lonami Exo
80d44cb75b
Fix sign_up call to sign_in
2022-02-17 12:40:38 +01:00
Lonami Exo
94ac667e79
Support direct sign_in with code and password
2022-02-17 12:40:38 +01:00
Lonami Exo
5c6fdf9a71
Return custom User from sign_in/sign_up
2022-02-17 12:40:38 +01:00
Lonami Exo
1029c38d7e
Remove phone and hash from sign_up
2022-02-17 12:40:38 +01:00
Lonami Exo
90bd5de74a
Remove phone and hash from sign in
2022-02-17 12:40:38 +01:00
Lonami Exo
df0e710fa1
Add a custom SentCode type
2022-02-17 12:40:38 +01:00
Lonami Exo
4258ce2bc8
Make is_connected a property
...
This is consistent with the rest of is_ properties
2022-02-17 12:40:38 +01:00
Lonami Exo
faaa038825
Fix RpcError catch-all
2022-02-07 11:30:27 +01:00
Lonami Exo
56faccf151
Fix and update usage of parse_mode
2022-02-07 11:30:27 +01:00
Lonami Exo
7142734fb4
Remove StateCache and EntityCache
2022-01-18 18:19:14 +01:00
Lonami Exo
f8264abb5a
Clean-up client's __init__ and remove entity cache
...
Entity cache uses are removed. It was a source of ever-growing memory
usage that has to be reworked. This affects everything that tried to
obtain an input entity, input sender or input chat (such as the
SenderGetter or calls to _get_entity_pair). Input entities need to be
reworked in any case.
Its removal also affects the automatic cache of any raw API request.
Raise last error parameter is removed, and its behaviour made default.
The connection type parameter has been removed, since users really have
no need to change it.
A few more attributes have been made private, since users should not
mess with those.
2022-01-18 12:56:17 +01:00
Lonami Exo
a3513d5232
Remove broken force_sms
2022-01-16 12:19:07 +01:00
Lonami Exo
7524b652c8
Unify setting session state
2022-01-15 11:22:33 +01:00
Lonami Exo
3b1660669e
Remove self input user and bot cache from client
...
The session_state cache can be used instead.
This does put get_me with input_peer at a disadvantage, but I expect
this is not used all that often, since 'me' does just fine.
2021-09-19 18:16:12 +02:00
Lonami Exo
cc3d4145d8
Update and persist session state on successful login
2021-09-19 18:15:19 +02:00
Lonami Exo
81b4957d9b
Update code to deal with the new sessions
2021-09-19 16:38:11 +02:00
Lonami Exo
4321b97e98
No longer run send_code_request from sign_in
2021-09-18 16:36:11 +02:00
Lonami Exo
af81899bdc
Don't automatically start the client via async-with
2021-09-18 13:30:39 +02:00
Lonami Exo
499fc9f603
Move alltlobjects.py and fix imports
2021-09-12 16:58:06 +02:00
Lonami Exo
c84043cf71
Fix calls to private client methods
2021-09-12 14:09:53 +02:00
Lonami Exo
f222dc167e
Fix imports
2021-09-12 13:27:13 +02:00
Lonami Exo
d48649602b
Replace most raw API usage with new location
2021-09-12 12:16:02 +02:00
Lonami Exo
2a933ac3bd
Remove sync hack
2021-09-11 14:06:36 +02:00
Lonami Exo
d6326abacb
Rename client module as _client
2021-09-11 13:35:35 +02:00