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
02703e3753
Fix circular import regarding ignore_takeout
2022-01-15 13:18:53 +01:00
Lonami Exo
7524b652c8
Unify setting session state
2022-01-15 11:22:33 +01:00
Lonami Exo
be0da9b183
Update takeout to use less hacks
2022-01-09 14:41:10 +01:00
Lonami Exo
2db0725b98
Fix generating error names in TL ref
2022-01-09 14:41:04 +01:00
Lonami Exo
691160bd92
Remove 3.7 workarounds
2022-01-09 13:03:02 +01:00
Lonami Exo
be6508dc5d
Use frozen dataclasses for session types
...
Now that 3.7 is the minimum version,
we can use dataclasses.
2022-01-09 13:01:16 +01:00
Lonami Exo
7ea30961ae
Bump minimum required Python version to 3.7
2022-01-09 13:00:45 +01:00
Lonami Exo
721c803af9
Stop opening webbrowser on clicking URL buttons
2022-01-09 12:23:06 +01:00
Lonami Exo
232e76e73a
Stop setting the sender to be the channel when missing
2022-01-09 12:20:58 +01:00
Lonami Exo
010ee0813a
Rename send_read_acknowledge
2022-01-09 12:18:15 +01:00
Lonami Exo
1b15a34f69
Remove parse_mode from the client
2022-01-09 12:18:15 +01:00
Lonami Exo
e2132d5f7c
Change the way thumb size selection works
2022-01-09 12:18:15 +01:00
Lonami Exo
03de901b7f
Add enum for typing action
2022-01-09 12:18:15 +01:00
Lonami Exo
dbe66bf805
Remove TLObject.to_json
2022-01-09 12:18:15 +01:00
Lonami Exo
b566e59036
Add stringify back to custom Message
2022-01-09 12:18:15 +01:00
Hackintosh 5
8de375323e
Cleanup events code
2021-12-11 21:46:23 +01:00
penn5
8d1379f3d4
Remove _finish_init from chataction.py
...
This method was removed in 334a847de7
2021-12-11 21:46:23 +01:00
penn5
d3ef3c69c8
Remove _finish_init from newmessage.py
...
This method was removed in 334a847de7
2021-12-11 21:46:23 +01:00
penn5
dea424fdec
Fix typo in messages.py
2021-12-11 21:46:23 +01:00
Reinier Romero Mir
f9643bf737
Add missing async when downloading from URL ( #3222 )
2021-12-01 20:28:55 +01:00
Lonami Exo
bda4259815
Bump to v1.24
2021-12-01 19:08:47 +01:00
Lonami Exo
c9ecd61f7e
Fix peer ID check to work with higher IDs
...
This commit is taken from
5f4bfe6b9b
2021-12-01 19:03:59 +01:00
Shrimadhav U K
9c796e8d73
Fix typo, add errors, and update to 133 again ( #3157 )
2021-12-01 19:00:29 +01:00
Lonami Exo
a5dce81d0f
Actually fill parameters in Message._as_input
2021-10-12 18:01:34 +02:00
Lonami Exo
72fc8f6808
Continue work on Message sending overhaul
2021-10-12 17:59:30 +02:00
Lonami Exo
3853f98e5f
Begin work into making Message a viable way to send them
2021-10-09 12:01:45 +02:00
Lonami Exo
5a8c066ff7
Fix generated RpcError were no longer formatting the value
2021-09-28 21:07:15 +02:00
Lonami Exo
1c15375ea4
Fix get_participants was monkey-patching User
...
It no longer can do that. User has __slots__.
2021-09-28 21:06:00 +02: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
a9e1a574ae
Fix limit was no longer defaulting to empty tuple
...
Introduced by 5a44510e2d
.
When forwarding the calls, both signantures should match.
2021-09-26 18:37:09 +02:00
Lonami Exo
6f602a203e
Fix custom.Forward not using the new __slots__
2021-09-26 18:33:03 +02:00
Lonami Exo
e3b1dc2059
Make to_dict dynamic
2021-09-26 18:30:08 +02:00
Lonami Exo
86c47a2771
Use __slots__ in all generated classes
2021-09-26 17:52:16 +02:00
Lonami Exo
8bd4835eb2
Remove build_reply_markup from the client
2021-09-26 17:24:18 +02:00
Lonami Exo
6fec2a68c5
Use a proper markdown parser
2021-09-25 20:33:25 +02:00
Lonami Exo
1762f554df
Make events subpackage private
2021-09-24 21:11:50 +02:00
Lonami Exo
5a44510e2d
Forward client calls to impl in a more straightforward manner
2021-09-24 20:46:33 +02:00
Lonami Exo
ce292b36ab
Fix GROUP check in EntityCache
2021-09-24 20:12:23 +02:00
Lonami Exo
debde6e856
Completely overhaul errors to be generated dynamically
2021-09-24 20:12:00 +02:00
Lonami Exo
cfe47a0434
Correct privacy on sessions module
2021-09-19 18:24:16 +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
3f13357d0f
Fix SQLiteSession.set_state did not always clear old state
...
For instance, when we stored a user_id of 0 because we did not login yet.
2021-09-19 18:02:08 +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
35a6d1e294
Fix SessionState did not store takeout_id
2021-09-19 17:59:35 +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