Commit Graph

469 Commits

Author SHA1 Message Date
Lonami Exo
bff2e6981e Fix ._pop_request_of_type failing on not-found requests 2017-10-12 18:03:10 +02:00
Lonami Exo
7bb7cb039f Fix handle RpcResult not always returning a bool 2017-10-12 17:58:37 +02:00
Lonami Exo
0c1170ee61 Replace hardcoded reads with TLObject's .read() 2017-10-12 16:40:59 +02:00
Lonami Exo
3a4662c3bf Remove forgotten print call from authenticator.py 2017-10-12 16:07:25 +02:00
Lonami Exo
301da16f29 Fix pong response not reading all data from the buffer 2017-10-11 21:09:09 +02:00
Lonami Exo
da51e71def Fix .get_input_entity returning marked IDs (closes #314) 2017-10-09 19:40:39 +02:00
Lonami Exo
db623e37fd Except ConnectionResetError on ._reconnect (fix #309) 2017-10-09 13:23:39 +02:00
Lonami Exo
e2ac18b7bc Use larger chunks when downloading/uploading files 2017-10-09 13:19:03 +02:00
Lonami Exo
a7622324dd Remove unnecessary offset_index variable on .download_file 2017-10-09 12:00:14 +02:00
Lonami Exo
6f1c05633e Join all threads when calling .disconnect() (fix #252) 2017-10-09 11:47:10 +02:00
Lonami Exo
f984aae391 Except ProxyConnectionError on ReadThread (fix #307) 2017-10-09 11:37:08 +02:00
Lonami Exo
2a1a4508b8 Allow overriding DocumentAttributes on .send_file (fix #294) 2017-10-09 11:20:31 +02:00
Lonami Exo
4673a02ce6 Stop calling .process_entities where not needed 2017-10-09 11:20:31 +02:00
Lonami Exo
401de913af Fix EntityDatabase failing with InputPeer keys 2017-10-09 11:20:31 +02:00
Joscha Götzer
4a482b3506 .get_drafts() and a custom Draft class (#310) 2017-10-09 09:54:48 +02:00
Lonami Exo
1f54cbfb5a Make str(TLObject) return valid code to generate it back 2017-10-08 17:51:29 +02:00
Lonami Exo
48c8837f19 Don't look on all dialogs on .get_entity miss 2017-10-08 16:25:50 +02:00
Lonami Exo
15e90dcb69 Allow specifying a threshold to handle flood waits 2017-10-08 16:15:30 +02:00
Lonami Exo
83677fc927 Enhance and use .get_input_photo on the generated code 2017-10-08 13:45:14 +02:00
Lonami Exo
62aec947c0 Chang auto-reconnect condition (fix #303) 2017-10-08 10:52:56 +02:00
Lonami Exo
244a47cddd Fix consuming all retries on Requests returning False/empty list 2017-10-07 18:54:30 +02:00
Joscha Götzer
7b5d409c49 Warn users on .add_update_handler if no workers are running (#300) 2017-10-07 17:55:37 +02:00
Lonami Exo
91a5d20e93 Replace .on_response with static .from_reader for all types 2017-10-07 13:26:09 +02:00
Lonami Exo
a17def8026 Use basename instead abspath for filename attribute (#294) 2017-10-06 21:48:53 +02:00
Lonami Exo
6d877549cb Cleanup utils.get_peer_id 2017-10-06 21:47:10 +02:00
Lonami Exo
3bf70692b4 Fix TelegramClient.get_input_entity always failing/missing return 2017-10-06 21:43:04 +02:00
Lonami Exo
79e36c98bd Fix EntityDatabase.get_input_peer not actually working 2017-10-06 21:42:04 +02:00
Lonami Exo
804a29d0bc Fix get_input_entity from peer ID not actually working 2017-10-06 21:05:02 +02:00
Lonami Exo
9d394ab18b Send MsgsAck in the same container along with the requests 2017-10-06 11:36:39 +02:00
Lonami Exo
1d8a02685f Update to v0.15.1 2017-10-05 13:58:26 +02:00
Lonami Exo
7aa21dbd07 Fix .get_dialogs to never return more than limit 2017-10-05 13:55:58 +02:00
Lonami
427a6aabaa Merge pull request #296 from LonamiWebs/entity-db
Use a custom database for entities
2017-10-05 13:46:16 +02:00
Lonami Exo
dde196d8e4 Swallow errors when processing entities
Some bug was causing an infinite lock due to the entity
database failing with InputPeerSelf, since adding a full
entity to the database wasn't disallowing self, and so
wasn't utils get_peer_id. Although last commit fixed that,
just in case, swallow errors there.
2017-10-05 13:34:44 +02:00
Lonami Exo
1fb3d0d00c Fix EntityDatabase failing to cache self user 2017-10-05 13:34:11 +02:00
Lonami Exo
4f2a44231a Allow disabling the EntityDatabase fully or partially 2017-10-05 13:06:51 +02:00
Lonami Exo
99cc0778bb Allow EntityDatabase to be accessed by phone 2017-10-05 13:01:00 +02:00
Lonami Exo
a8edacd34a Fix get_peer_id going into infinite recursion for InputPeerSelf 2017-10-05 12:59:44 +02:00
Lonami Exo
16f929b8b6 Fix .get_peer_id not working with full entities 2017-10-05 12:33:24 +02:00
Lonami Exo
10eca82143 Fix process_entities not working on list of entities 2017-10-05 12:29:52 +02:00
Lonami Exo
d2e244817a Make EntityDatabase.get a no-op if key is an entity already 2017-10-05 12:28:04 +02:00
Lonami Exo
e5c4df98df Use EntityDatabase on TelegramClient.get_entity instead lru_cache 2017-10-05 12:27:32 +02:00
Lonami Exo
a0fc5ed54e Use EntityDatabase in the Session class 2017-10-04 21:02:45 +02:00
Lonami Exo
a98dc9d95b Try passing socks.GeneralProxyError to the main thread 2017-10-04 14:09:46 +02:00
Lonami Exo
5be9df0eec Add a basic EntityDatabase class 2017-10-04 13:58:36 +02:00
Joscha Götzer
6c375a7aed Add method to .delete_messages() (#282) 2017-10-02 18:59:29 +02:00
3bl3gamer
0f019f0476 Rename last subclass_of_id to upper case (#285) 2017-10-02 13:26:55 +02:00
Lonami Exo
ba147bbe10 Fix TgClient.get_input* not calling utils.get_input* when needed 2017-10-01 21:15:49 +02:00
Lonami Exo
43f796caab Fix .get_dialogs() failing on Windows 2017-10-01 21:02:41 +02:00
Lonami Exo
d98fd6a424 Fix workers not stopping on .disconnect(), start them on login 2017-10-01 19:56:24 +02:00
Lonami Exo
62ea77cbea Fix opposite condition on .get_dialogs 2017-10-01 19:45:42 +02:00