Commit Graph

832 Commits

Author SHA1 Message Date
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
Lonami Exo
56e81c05d6 Revert "Designed Logo, added to README (#283)"
This reverts commit a6099f92bf.
2017-10-03 09:23:22 +02:00
Joscha Götzer
6c375a7aed Add method to .delete_messages() (#282) 2017-10-02 18:59:29 +02:00
Joscha Götzer
a6099f92bf Designed Logo, added to README (#283) 2017-10-02 16:06:11 +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
3805aa3772 Update interactive example to show how to get user from updates 2017-10-01 20:12:27 +02:00
Lonami Exo
ace44965f8 Fix interactive client not receiving updates 2017-10-01 19:56:47 +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
Lonami Exo
e717256937 Always use session ip address and port when connecting 2017-10-01 19:26:20 +02:00
Lonami Exo
269949595f Allow phone as int on .sign_in (#278) 2017-10-01 19:02:53 +02:00
Lonami Exo
354ea1c0c8 Add ChannelPrivateError error 2017-10-01 18:53:12 +02:00
Lonami Exo
8c3a2470ed Update to v0.15 2017-10-01 17:38:48 +02:00
Lonami Exo
d30fdbe778 Support "string" peers on .get_input_entity 2017-10-01 16:59:18 +02:00
Lonami Exo
8df4d7c4a5 Internal methods should use .get_input_entity 2017-10-01 16:54:11 +02:00
Lonami Exo
1cdf879888 Fix .get_input_entity failing for chats 2017-10-01 16:53:47 +02:00
Lonami Exo
1ded6d9d06 Expand Updates into Update objects before calling handlers 2017-10-01 16:30:27 +02:00
Lonami Exo
c61e168de4 Rename invoke to __call__ 2017-10-01 16:04:14 +02:00
Lonami Exo
36dabc4928 Process entities from the MtProtoSender instead TelegramBareClient
This way, update objects will also be processed when they occur.
2017-10-01 16:02:29 +02:00
Lonami Exo
71b6e527a6 Allow using parenthesis or spaces in phones when .get_entity 2017-10-01 15:50:23 +02:00
Lonami Exo
5b6f9b6542 Add a new .get_input_entity method and use it on .get_entity 2017-10-01 14:19:04 +02:00
Lonami Exo
9bccd17881 Add an option to allow not saving/processing found entities 2017-10-01 13:32:27 +02:00