Lonami Exo
85a9c13129
Fix login info did not persist
2022-01-17 11:50:28 +01:00
Lonami Exo
a62627534e
Get rid of client.loop
...
Instead, use the asyncio-intended way of implicit loop.
2022-01-16 13:51:23 +01:00
Lonami Exo
a95393648f
Remove custom enum parsing
...
Python enums can already be parsed out-of-the-box.
2022-01-16 12:06:42 +01:00
Lonami Exo
fe941cb940
Address immutability issues on connect
2022-01-15 13:41:23 +01:00
Lonami Exo
f5f0c84553
Completely overhaul connections and transports
...
Reduce abstraction leaks. Now the transport can hold any state,
rather than just the tag. It's also responsible to initialize on
the first connection, and they can be cleanly reset.
asyncio connections are no longer used, in favour of raw sockets,
which should avoid some annoyances.
For the time being, more obscure transport modes have been removed,
as well as proxy support, until further cleaning is done.
2022-01-15 13:33:50 +01:00
Lonami Exo
7524b652c8
Unify setting session state
2022-01-15 11:22:33 +01:00
Lonami Exo
197a1ca996
Fix some modules were public when they should not have been
2021-09-26 19:58:42 +02:00
Lonami Exo
debde6e856
Completely overhaul errors to be generated dynamically
2021-09-24 20:12:00 +02:00
Lonami Exo
26f6c62ce4
Init update state cache to empty in init
2021-09-19 18:17:37 +02: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
016347474a
Populate current user on connection if it's not yet saved
2021-09-19 18:01:01 +02:00
Lonami Exo
545e9d69ce
Cache session_state and all_dcs right after connect
2021-09-19 17:51:05 +02:00
Lonami Exo
93dd2a186a
Refresh DC info on connection
2021-09-19 17:41:40 +02:00
Lonami Exo
58c0a5bc24
Make IPv4 mandatory in session files
2021-09-19 17:30:31 +02:00
Lonami Exo
9479e215fb
Fix remaining upgraded uses of the session to work correctly
2021-09-19 17:08:51 +02:00
Lonami Exo
81b4957d9b
Update code to deal with the new sessions
2021-09-19 16:38:11 +02:00
Lonami Exo
29d3c3fd7c
Fix outdated LAYER usage in _create_exported_sender
2021-09-19 15:56:28 +02:00
Lonami Exo
e524a74b84
Remove client.disconnected property
2021-09-18 15:41:04 +02:00
Lonami Exo
3d36bb7b93
Change the way connection modes are specified
2021-09-18 12:49:44 +02:00
Lonami Exo
3bc46e8072
Remove broken CdnDecrypter
2021-09-17 20:55:27 +02:00
Lonami Exo
943ad892f7
Address remaining uses of the Request suffix with raw API
2021-09-13 21:00:31 +02:00
Lonami Exo
499fc9f603
Move alltlobjects.py and fix imports
2021-09-12 16:58:06 +02:00
Lonami Exo
e9b97b5e4a
Fix client method calls and reading TLObjects
2021-09-12 15:47:05 +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
f86339ab17
Remove Conversation API
2021-09-11 14:16:25 +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