Commit Graph

3023 Commits

Author SHA1 Message Date
Lonami Exo
a9a2401e44 Fix CallbackQuery using string regex 2018-10-17 11:44:08 +02:00
Lonami Exo
419fe6dca3 Raise RuntimeError on with blocks that need async 2018-10-17 11:30:07 +02:00
Lonami Exo
9cbc088b76 Make disconnect synchronous
This also fixes a bug when auto-reconnecting in MTProtoSender.
2018-10-16 11:56:17 +02:00
Lonami Exo
477fbd8dc7 Generate simple examples for the docs 2018-10-16 09:29:48 +02:00
Lonami Exo
8f04ec820f Don't add functions as possible argument types 2018-10-15 21:12:10 +02:00
Lonami Exo
bb180a1db8 Split generator/tlobject into separate files 2018-10-15 19:29:32 +02:00
Lonami Exo
e3c4bd46fb Reference argument types to objects when parsing .tl 2018-10-15 19:23:09 +02:00
Lonami Exo
b219da6b87 Fix Dialog.is_group for types.ChatForbidden 2018-10-15 18:43:53 +02:00
Lonami Exo
34cefed9ff Except BotMethodInvalidError on getContacts 2018-10-15 18:42:35 +02:00
Lonami Exo
99129daeee Show the request that caused RPC errors in their messages 2018-10-15 18:35:51 +02:00
Lonami Exo
ee4c952290 Add descriptions for new RPC errors 2018-10-15 17:57:16 +02:00
Lonami Exo
0094eb391e Support exclusive conversations by default 2018-10-12 22:17:07 +02:00
Lonami Exo
cf6686ff42 Revert async sessions from 3dd8b7c (breaks sync properties)
Such as ChatGetter.input_chat and SenderGetter.input_sender
which rely on the fact that access to the session file will
be synchronous.
2018-10-12 22:00:02 +02:00
Lonami Exo
e677a6bb05 Fix is_user_authorized after log_out 2018-10-12 19:57:16 +02:00
Lonami Exo
6e77f583f1 Detect arbitrary negative HTTP error codes 2018-10-12 19:47:40 +02:00
Lonami Exo
cca7055fcf Add inline mode to the assistant example 2018-10-12 13:33:55 +02:00
Lonami Exo
74f7ae525f Document InlineBuilder 2018-10-12 12:38:46 +02:00
Lonami Exo
9ee415749d Fix InlineBuilder.photo/document and clearer errors 2018-10-12 11:50:36 +02:00
Lonami Exo
32c884d543 Revert d392939 and use empty tuple as a sentinel value 2018-10-08 11:33:56 +02:00
Lonami Exo
27345d5749 Work around importing sync and using full_sync 2018-10-08 11:13:24 +02:00
Lonami Exo
26c773392e Explain run_until_disconnected in the docs 2018-10-07 11:18:40 +02:00
Lonami Exo
2d94a104d1 Syncify events too 2018-10-06 21:08:38 +02:00
Lonami Exo
ded24db3dd Fix proxy support by removing conflicting arguments 2018-10-06 20:56:09 +02:00
Lonami Exo
8c14259728 Update documentation with new sections 2018-10-06 20:20:11 +02:00
Lonami Exo
fb9660afe0 Add missing awaits 2018-10-06 12:39:07 +02:00
Lonami Exo
67be6418b6 Remove callback parameter from custom.Button
Its behaviour was strange. Removing and adding an event
handler every time a message is sent is not a good idea
and it would just do more harm than good.
2018-10-05 20:54:50 +02:00
josephbiko
3dd8b7c6d1 Support async def in sessions (#1013) 2018-10-05 20:25:49 +02:00
Tulir Asokan
653f3c043d Add full_sync module (#1016) 2018-10-05 19:59:56 +02:00
Lonami Exo
730cf31921 Delete all (broken) tests 2018-10-05 19:36:01 +02:00
Lonami Exo
d392939018 Create a default module to use as a sentinel value
This looks better in the documentation than utils.Default,
cleans the utils with specific stuff like this, and users
may use it more easily.
2018-10-05 14:20:50 +02:00
Lonami Exo
0fcc2e5e52 Add autocast for InputDocument and InputChatPhoto 2018-10-05 14:11:47 +02:00
Lonami Exo
aa3f26263c Fix timeout not accepting timedelta 2018-10-05 14:06:15 +02:00
Lonami Exo
dedbf29ca4 Fix Conversation.wait_event not resolving them (from d474458) 2018-10-05 13:42:07 +02:00
Lonami Exo
dc77136453 Don't expect responses from ack, log send errors, remove TODOs 2018-10-05 13:26:44 +02:00
Lonami Exo
ef60ade647 Rewrite container packing to support arbitrary sizes 2018-10-05 13:26:44 +02:00
Lonami Exo
7e7bbcf4c0 Remove irrelevant TODOs and add more logging 2018-10-05 13:26:44 +02:00
Lonami Exo
a5d4e97922 Fix alternative connection modes 2018-10-05 13:26:44 +02:00
Lonami Exo
ebde3be820 Add support for proxy again 2018-10-05 13:26:44 +02:00
Lonami Exo
db83709c6b Support connection timeout 2018-10-05 13:26:44 +02:00
Lonami Exo
0cc8bca098 Delete TcpClient 2018-10-05 13:26:44 +02:00
Lonami Exo
1b9d6aac06 Gzip only content related data 2018-10-05 13:26:44 +02:00
Lonami Exo
37b9922f64 Handle cancellation on the receive loop 2018-10-05 13:26:44 +02:00
Lonami Exo
e319fa3aa9 Handle IncompleteReadError and InvalidChecksumError 2018-10-05 13:26:44 +02:00
Lonami Exo
3fd7c33127 Fix automatic reconnect (e.g. on bad auth key)
This took more time than it should have to debug.
2018-10-05 13:26:44 +02:00
Lonami Exo
bc1fd9039d Handle receiving errors 2018-10-05 13:26:44 +02:00
Lonami Exo
cf7e5d5592 Set auth_key on connection 2018-10-05 13:26:44 +02:00
Lonami Exo
21ffa2f26b Fix DC migration and seqno 2018-10-05 13:26:44 +02:00
Lonami Exo
ac567ebf1d Handle bad salt/msg not resending containers 2018-10-05 13:26:44 +02:00
Lonami Exo
3b1142aaca Add back auth key generation process 2018-10-05 13:26:44 +02:00
Lonami Exo
5edc2216c7 Handle initial connection if network is down correctly 2018-10-05 13:26:44 +02:00