Commit Graph

136 Commits

Author SHA1 Message Date
Lonami Exo
d3a6822fc9 Properly resolve events 2018-08-21 12:18:12 +02:00
Lonami Exo
d474458136 Simplify event resolving logic
Although this commit introduces a race condition since an
event may only be half-resolved. A lock is thus needed,
but it depends on an event-loop to which we don't have
access in the class-level.
2018-08-21 11:08:08 +02:00
Lonami Exo
9f237cc928 Simplify event building logic
This will also fix some bugs where the event type being accessed
would not be available, since it is now built on-demand, without
the need to keep track for the count of each event type.
2018-08-21 10:27:12 +02:00
Lonami Exo
7efa53fedf Update to v1.2 2018-08-14 18:48:56 +02:00
Lonami Exo
653686996a Revisit catch_up (#808) 2018-08-13 12:32:12 +02:00
Lonami Exo
48113851a8 Fix built Conversation events don't have the client 2018-08-05 02:01:06 +02:00
Lonami Exo
ca40a9c282 Add Conversation.wait_event 2018-08-05 01:55:41 +02:00
Lonami Exo
785ef7676f Create a basic custom.Conversation 2018-08-03 17:51:56 +02:00
Lonami Exo
46b2d910d7 Fix logging of functools.partial() callbacks 2018-07-21 17:52:42 +02:00
Lonami Exo
22c8fd7378 Fix Updates object being dispatched to user handlers 2018-07-12 09:45:29 +02:00
Lonami Exo
1d0fd6801d Build events only once per update 2018-07-11 11:22:43 +02:00
Lonami Exo
81f31e09c8 Keep track of how many events for each type were added 2018-07-11 10:50:19 +02:00
Lonami
ac5f8da50c
Fix update.pts may be None 2018-07-10 16:59:40 +02:00
josephbiko
e6981e7676 Remove empty except (#887) 2018-07-09 20:54:43 +02:00
Lonami Exo
3c2ff45b0b Support dispatching updates in a sequential order 2018-06-29 10:45:04 +02:00
Lonami Exo
a6782ac6ea Send getState upon successful reconnection 2018-06-27 19:40:32 +02:00
Lonami Exo
c0412e4410 Fix run_until_disconnected disconnect with telethon.sync 2018-06-27 19:39:47 +02:00
Lonami Exo
6152e33454 Fix sync run_until_disconnected not liking Ctrl+C 2018-06-26 15:48:38 +02:00
Lonami Exo
75dc4809f5 Remove all deprecated methods 2018-06-26 11:10:11 +02:00
Lonami Exo
9c6d2894fc Allow start when the loop is not running 2018-06-25 13:42:29 +02:00
Lonami Exo
db5cb74bdd Allow run_until_disconnected when the loop is running 2018-06-25 13:32:31 +02:00
Lonami Exo
d4479a0a4e Save the session file less often 2018-06-24 12:21:58 +02:00
Lonami Exo
3d3698562b Cleanly handle KeyboardInterrupt in run_until_disconnected 2018-06-22 13:26:24 +02:00
Lonami Exo
a1477a84bf Update in-memory updates.State 2018-06-20 19:58:01 +02:00
Lonami Exo
c85ba4accc Revisit documentation, cross-references and unnecessary indents 2018-06-20 11:06:03 +02:00
Lonami Exo
262018959f Process entities from sent requests/updates 2018-06-18 20:44:20 +02:00
Lonami Exo
51d8ea0fa8 Shield disconnected Future in the MTProtoSender instead 2018-06-18 15:55:24 +02:00
Lonami Exo
efc48ee3b0 Shield self.disconnected and log RpcCallFail 2018-06-18 14:28:30 +02:00
Lonami Exo
374f5e2aab Periodically send ping/getState 2018-06-18 13:22:25 +02:00
Dan Elkouby
d5b349e031 Implement a mechanism to notify of connection failures (#852) 2018-06-17 19:29:41 +02:00
Lonami Exo
31c94ec184 Add a lock for resolving events 2018-06-15 10:11:43 +02:00
Lonami Exo
091b03c635 Use create_task instead ensure_future 2018-06-14 23:33:56 +02:00
Lonami Exo
c788e17c22 Fix _handle_update not expanding Updates 2018-06-14 22:51:57 +02:00
Lonami Exo
0f14f3b16a Support custom event loops 2018-06-14 19:35:12 +02:00
Lonami Exo
3ce8b17193 Dispatch updates to event handlers 2018-06-13 16:20:15 +02:00
Lonami Exo
fb8b052754 Separate update requests from the TelegramClient 2018-06-10 13:58:21 +02:00