Lonami Exo
e36517845a
Retry on connection/security errors
2018-06-08 20:50:53 +02:00
Lonami Exo
92b606a3e8
Automatically reconnect on connection reset
2018-06-08 20:42:39 +02:00
Lonami Exo
5c917fb425
Except timeout error and retry
2018-06-07 18:01:18 +02:00
Lonami Exo
f72ddbdd5a
Implement retry and fail cases in authenticator
2018-06-07 17:25:02 +02:00
Lonami Exo
df895a94ab
Create auth_key if not present
2018-06-07 16:32:12 +02:00
Lonami Exo
a940e2e9a2
Process entities and add a handler for updates
2018-06-07 14:32:22 +02:00
Lonami Exo
c7e4ae8672
Send acks
2018-06-07 14:16:47 +02:00
Lonami Exo
805bf00dee
Support sending multiple requests at once
2018-06-07 14:04:04 +02:00
Lonami Exo
884dbe2d1f
Use a custom Queue to simplify the _send_loop
2018-06-07 13:51:19 +02:00
Lonami Exo
382355a22f
Collapse multiple requests into a single container
2018-06-07 13:33:32 +02:00
Lonami Exo
a3687b8bb5
Complete all methods under MTProtoSender and document them
2018-06-07 12:29:43 +02:00
Lonami Exo
0418f7e375
Fix get_entities_text and allow filtering by type
2018-06-07 10:46:32 +02:00
Lonami Exo
56b09c0c9d
Properly set future results
2018-06-07 10:30:20 +02:00
Lonami Exo
9477c75fce
Fix basic requests sending and receiving
2018-06-06 21:42:48 +02:00
Lonami Exo
e469258ab9
Create a new MTProtoSender structure and its foundation
...
This means that the TcpClient and the Connection (currently only
ConnectionTcpFull) will no longer be concerned about handling
errors, but the MTProtoSender will.
The foundation of the library will now be based on asyncio.
2018-06-06 20:41:01 +02:00
Lonami Exo
ed5c44a260
Support deleting more than 100 messages at once
2018-06-05 21:27:49 +02:00
Lonami Exo
30ad06f29a
Fix events.Raw not having ._set_client
2018-06-04 18:36:23 +02:00
Vaschuk Maxim
3db104c7bc
to_bytes() named argument 'length' removed for PyPy ( #834 )
2018-06-04 12:34:52 +02:00
Lonami Exo
2e43fb3217
More nasty hacks to fix events.NewMessage attrs
2018-06-03 17:09:36 +02:00
Lonami Exo
fe3172b2c9
Fix accept TOS must be called after sign up ( #824 )
2018-06-03 16:47:19 +02:00
Lonami Exo
997f2b62ce
Fix EventCommon/custom.Message conflicting properties
2018-06-03 16:41:13 +02:00
Lonami Exo
8c8a0153ef
Revert 9db9d1e's count and fix typo
2018-06-03 15:20:52 +02:00
Lonami Exo
ab9d10c569
Update to v0.19.1
2018-06-03 14:20:50 +02:00
Lonami Exo
c2b8f8a1d6
Support editing media
2018-06-03 13:49:19 +02:00
Lonami Exo
2fb5215f5f
Fix parsers misbehaving with None text
2018-06-03 13:48:43 +02:00
Lonami Exo
92b6e857a4
Separate file_to_media logic from send_file
2018-06-03 13:37:18 +02:00
Lonami Exo
e93b8f2b13
Update to layer 80 and accept TOS on sign_up ( #824 )
2018-06-03 13:26:51 +02:00
Lonami Exo
b2ed6caff4
Fix setattr for events.NewMessage/custom.Message
2018-06-03 13:00:07 +02:00
Lonami Exo
0a3151175d
Fix infinite recursion on setattr custom.Message
2018-06-03 12:29:30 +02:00
Lonami Exo
81c61a0a2e
Handle MessagesNotModified on iter_messages
2018-06-03 12:03:02 +02:00
Lonami Exo
8d7c7a19c0
Add some setters for custom.Message
2018-06-03 11:53:18 +02:00
Lonami Exo
8b16023566
Allow setting a per-client default parse mode
2018-06-03 11:29:48 +02:00
Lonami Exo
f7222407de
Document custom.Message
2018-06-02 12:52:38 +02:00
Lonami Exo
5c76af34aa
Fix copy-paste typo
2018-06-02 12:38:47 +02:00
Lonami Exo
6dcd0911a7
Move events.NewMessage properties to custom.Message
2018-06-02 12:30:25 +02:00
Lonami Exo
97b0a0610e
Support get_messages(ids=) without entity
2018-06-02 12:09:21 +02:00
Lonami Exo
e2ce55871e
Replace custom.Message's class on creation
2018-06-01 21:20:34 +02:00
Lonami Exo
9db9d1ed5c
Implement __bytes__ and use count instead sum
2018-05-31 22:39:32 +02:00
Lonami Exo
2191fbf30b
Fix custom.Message.click not having buttons
2018-05-31 14:10:19 +02:00
Lonami Exo
a1c511429e
Port NewMessage.edit/delete to custom.Message
2018-05-31 14:01:42 +02:00
Lonami Exo
66d5443fcd
Add custom.Message.fwd_from_entity
2018-05-31 13:56:33 +02:00
Lonami Exo
58f621ba82
Make custom.Message more consistent with previous patches
2018-05-31 13:50:08 +02:00
Lonami Exo
9e4854fcce
Use custom.Message in events
2018-05-31 13:30:22 +02:00
Lonami Exo
b241d80958
Return custom.Message from the TelegramClient
2018-05-31 12:52:03 +02:00
Lonami Exo
5aed494aac
Fix custom.Message special methods
2018-05-31 12:50:08 +02:00
Lonami Exo
192b7af136
Lazily load user/input user on Message
2018-05-31 12:24:25 +02:00
Lonami Exo
aa70436441
Add a custom Message class
2018-05-31 10:32:32 +02:00
Lonami Exo
68bb8e8b91
Add is_user/group/channel and title to Dialog
2018-05-30 19:20:27 +02:00
Lonami Exo
ae87d452c8
Clean-up docs and merge some imports
2018-05-30 18:55:01 +02:00
Lonami Exo
780c66c619
Allow getting messages by their ID
2018-05-28 19:33:23 +02:00
Lonami Exo
6c20f8a2c7
Set is private/group=True for messages deleted out of channels
2018-05-28 18:27:44 +02:00
Lonami Exo
a1b22e0911
Support incoming=False to indicate outgoing=True
2018-05-28 18:25:01 +02:00
ferferga
2c9d3d2fed
Better handling of video notes ( #803 )
2018-05-24 12:28:10 +02:00
Lonami Exo
03f0044ef8
Change default iter/get messages limit
...
And fix-up previous commit.
2018-05-24 10:40:44 +02:00
Lonami Exo
a076688fdc
Avoid sending min_id/max_id params in iter_messages
2018-05-24 10:19:48 +02:00
Lonami Exo
fac6b2348b
Fix pts may be 0 with no workers set ( #808 )
2018-05-22 10:39:40 +02:00
Lonami Exo
b667bb0c1a
Fix some chat IDs start with 1000
2018-05-20 12:31:57 +02:00
Lonami Exo
129f5bf1f8
Add an additional check to avoid duplicate iter_messages
2018-05-17 12:08:52 +02:00
Lonami Exo
cffef411b2
Enhance documentation
2018-05-17 12:00:22 +02:00
Lonami Exo
a8be4bb615
Fix catch_up may use None state
2018-05-17 10:42:20 +02:00
Lonami Exo
89182ea010
Fix iter_messages + from_user not working without filter
2018-05-17 10:17:22 +02:00
Lonami Exo
208adc93a6
Stop using without rowid altogether
...
While something nice to have if supported, it just causes problems
for people trying to use the same session accross systems having
different sqlite versions. See https://t.me/TelethonChat/36771 .
2018-05-14 17:41:47 +02:00
Lonami Exo
c010683685
Fix using *args on phone migrate
2018-05-13 17:15:25 +02:00
Lonami Exo
32b7e9e27a
Whitelist generator's mismatching ID and ya username
2018-05-12 16:12:42 +02:00
Lonami Exo
e3c6676795
Fix short special usernames not being valid (like vote)
2018-05-11 10:09:38 +02:00
Lonami Exo
ee51aa7073
Fix lost requests on disconnect need_confirmation.clear
...
The pending acks shouldn't be cleared, in case of a reconnection
these would be pretty common. E.g. disconnect(), connect(),
invoke, repeat.
2018-05-10 16:45:55 +02:00
Lonami Exo
eb22bce2d9
Add missing connect abstractmethod
2018-05-10 16:16:23 +02:00
Lonami Exo
ba4b7ce881
Make the Connection a proper ABC ( #509 )
2018-05-10 14:22:19 +02:00
Lonami Exo
dd954b8fbd
Avoid receive busy wait when two threads receive items
2018-05-10 09:44:25 +02:00
Lonami Exo
ef509d13c7
Move InvokeAfterMsg to TLMessage to cleanly confirm results
2018-05-09 16:18:42 +02:00
Lonami Exo
e2e7e631b5
Stop using *args when invoking many requests at once
2018-05-09 10:19:45 +02:00
Lonami Exo
e200acbca8
Allow sending ordered MessageContainer
2018-05-09 09:46:07 +02:00
Lonami Exo
bda7eb0ef1
Update to v0.19
2018-05-07 21:30:12 +02:00
Lonami Exo
392508c78d
Add voice/video note parameters to send_file
2018-05-07 19:53:32 +02:00
Lonami Exo
37436bdeee
First attempt at updates catch_up for private chats/groups
2018-05-07 18:02:15 +02:00
Lonami Exo
6652fe276c
Remove broken packet length check
2018-05-07 17:05:27 +02:00
Lonami Exo
f06b9b68d5
Fix race condition causing broken responses
2018-05-07 17:01:04 +02:00
Lonami Exo
2922e8df11
Fix still broken log for broken packets
2018-05-07 16:46:58 +02:00
Lonami Exo
6cd96389c0
Call disconnect on ConnectionResetError hoping a reconnection
...
Maybe self._reconnect() had no effect unless a clean disconnect
was done, and so retrying would be mostly useless. Just a guess.
2018-05-06 18:59:53 +02:00
Lonami Exo
f442e01560
Documentation enhancements
2018-05-06 13:03:30 +02:00
Lonami Exo
2045e00563
Stop manually constructing InputFileLocation
2018-05-06 11:46:04 +02:00
Lonami Exo
ee1e4e18f6
Clean-up download_profile_photo and add missing cases
2018-05-06 11:41:42 +02:00
Lonami Exo
d6935355ae
Fix two tiny typos
2018-04-28 13:42:36 +02:00
Lonami Exo
ce7e5abb58
Support filtering events.Raw by update type
2018-04-28 13:37:19 +02:00
Lonami Exo
5c6ac18a52
Attach original_update to all events
2018-04-28 12:58:41 +02:00
Lonami Exo
08dbc42718
Update to layer 76
2018-04-28 11:49:43 +02:00
Lonami Exo
dc273ab6bc
Add utils.get_input_location
2018-04-27 21:11:13 +02:00
Lonami Exo
f16289cf93
Support download_file with None path to return bytes
2018-04-27 21:11:13 +02:00
Lonami Exo
b71511cd63
Fix saving update state in the SqliteSession
2018-04-27 21:11:13 +02:00
Lonami Exo
2a00bcaa12
Persist updates.State upon disconnection
2018-04-25 13:37:29 +02:00
Lonami Exo
e2a0de1913
Don't retry forever on TcpClient.connect()
2018-04-25 10:06:11 +02:00
Lonami Exo
387a255221
Faster iter_messages by sleeping only as much as needed
2018-04-25 09:51:50 +02:00
Lonami Exo
ea404c5477
Add update_state table to persist pts and such
2018-04-23 21:16:09 +02:00
Lonami Exo
ab91bc2829
Add missing InputPhoto/Document -> InputMedia autocast
2018-04-23 15:33:44 +02:00
Lonami Exo
f31ca142a3
Support autocast to InputMessage
2018-04-23 11:05:38 +02:00
Lonami Exo
6ecef42ec7
Add search/filter/from_user parameters to iter_messages
2018-04-22 16:30:14 +02:00
Lonami Exo
544651caa7
Retry on RpcCallFailError
2018-04-22 16:30:00 +02:00
Lonami Exo
5dc43276bb
Add missing caption when sending Message with media
2018-04-20 09:44:33 +02:00
Lonami Exo
1c2e9d2f27
Fix reply_to didn't override Message's reply on sending them
2018-04-20 09:36:34 +02:00
Lonami Exo
b0dda777fe
Support omitting the entity on client.edit_message
2018-04-18 10:27:44 +02:00