Commit Graph

3048 Commits

Author SHA1 Message Date
Lonami Exo
9c66f0b2b4 Fix empty strings not working as expected for flag parameters 2017-12-24 15:15:19 +01:00
Dmitry D. Chernov
fb9813ae61 TelegramClient.send_code_request(): Change logic of methods invocation
Before:
  First call, force_sms=False: SendCodeRequest
  Next call, force_sms=False: SendCodeRequest
  First call, force_sms=True: raise ValueError
  Next call, force_sms=True: ResendCodeRequest

That's inconvenient because the user must remember whether the code requested at all and whether the request was successful.
In addition, the repeated invocation of SendCodeRequest does nothing.

This commit changes logic to this:
  First call, force_sms=False: SendCodeRequest
  Next call, force_sms=False: ResendCodeRequest
  First call, force_sms=True: SendCodeRequest, ResendCodeRequest
  Next call, force_sms=True: ResendCodeRequest
2017-12-24 21:25:17 +10:00
Dmitry D. Chernov
4a2a64ce2f TcpClient: Catch ConnectionError instead of its particular cases
That can be more reliable, especially in the case of using PySocks.
2017-12-23 05:45:23 +10:00
Lonami Exo
992017ddf8 Except ConnectionAbortedError on TcpClient 2017-12-22 11:27:57 +01:00
Lonami Exo
23ab70fc29 Remove unused request_msg_id from the TLObject class 2017-12-20 17:48:41 +01:00
Lonami Exo
c848ae0ace Move tgread_object() outside specific msg processing calls 2017-12-20 17:45:40 +01:00
Lonami Exo
5842d3741b Make a proper use of the logging module 2017-12-20 12:47:39 +01:00
Lonami Exo
7d189119f4 Fix salt migration failing with valid signed salts 2017-12-20 12:47:39 +01:00
Alihossein Shahabi
fd291fa014 Fix typo in sessions.rst (#491) 2017-12-14 12:16:57 +01:00
Lonami Exo
0e0bc6ecbc Fix session ID is also signed since d4d7aa9 2017-12-07 12:22:40 +01:00
Lonami Exo
1d19bb22a5 Don't ignore NewSessionCreated salt 2017-12-04 20:34:35 +01:00
Lonami Exo
d4d7aa9063 Use signed salt 2017-12-03 21:10:22 +01:00
Lonami Exo
6662f49bcb Remove another redundant if 2017-11-30 21:10:02 +01:00
Lonami Exo
21a93d58ec Use a synchronized queue instead event/deque pair 2017-11-30 21:09:34 +01:00
Lonami Exo
7d7b2cb1fa Remove redundant checks from UpdateState 2017-11-30 20:40:35 +01:00
Lonami Exo
d515ede7da Fix TLParser not stripping inline comments 2017-11-30 13:34:55 +01:00
Lonami Exo
9046b46fcd Document the network/ module 2017-11-30 13:21:01 +01:00
Lonami Exo
7509ba9067 Assert that module was generated correctly on setup.py pypi 2017-11-29 12:34:15 +01:00
Lonami Exo
605c103f29 Add unparse markdown method 2017-11-26 17:16:59 +01:00
Lonami Exo
57a70d0d47 Document the extensions/ module 2017-11-26 17:14:28 +01:00
Lonami Exo
71eb542626 Document the errors/ module 2017-11-26 17:06:09 +01:00
Lonami Exo
a932fb6470 Document the crypto/ module 2017-11-26 16:57:40 +01:00
Lonami Exo
74ec6391d9 Fix-up security assertion (b42b4bb for #453) 2017-11-24 19:05:52 +01:00
Maxim Smirnov
b42b4bb326 Add OpenSSL assertion on authenticator.py (#453)
aes_ige.c(88): OpenSSL internal error, assertion failed
2017-11-24 18:47:36 +01:00
Dmitry D. Chernov
5a4d6d4a57 tlobject: Represent timestamp as 'int' instead of 'float' 2017-11-23 22:39:35 +10:00
Dmitry D. Chernov
f99d14558f binary_reader: Parse TL 'date' to UTC datetime instead of local 2017-11-23 02:06:43 +10:00
Lonami Exo
7d4453351b Update .gitignore to include docs/_build 2017-11-21 12:56:53 +01:00
Lonami
4e5dede7fe
Merge pull request #448 from jeffffc/master
Add readthedocs, transfer tutorials from wiki to there too
2017-11-21 12:53:58 +01:00
Lonami Exo
152856dfbc Add a force_fetch parameter to .get_entity 2017-11-20 10:58:11 +01:00
Jeff
9f033be05a fix in-docs links 2017-11-20 17:26:31 +08:00
Jeff
07d642a354 tiny fix for readthedocs 2017-11-20 13:58:42 +08:00
Jeff
d0c9324212 final fix for readthedocs 2017-11-20 12:19:53 +08:00
Jeff
f6ec7e47a7 add a bunch more readthedocs from wiki 2017-11-20 12:12:31 +08:00
Jeff
34e7ae026e add requirements.txt for readthedocs 2017-11-20 01:04:51 +08:00
Jeff
231ecf3f2a add readthedocs files 2017-11-20 00:56:05 +08:00
Lonami Exo
9767774147 Fix import in markdown parser not being relative 2017-11-17 15:57:48 +01:00
Lonami Exo
01f55200f2 Update to v0.15.5 2017-11-16 19:18:26 +01:00
Lonami Exo
346c5bb303 Add method to md parser to extract text surrounded by entities 2017-11-16 19:13:13 +01:00
Lonami Exo
e5deaf5db8 Fix c4e07cf, md parsing adding unfinished entity at wrong offset 2017-11-16 19:07:53 +01:00
Lonami Exo
4ddbc78699 Ensure IPv6 addresses are surrounded by '[]' (#425) 2017-11-16 13:47:15 +01:00
Lonami Exo
edd73ed69a Allow switching from IPv4 to IPv6 and vice versa 2017-11-16 13:40:25 +01:00
Vladislav Kolesnichenko
ee5915e86d Add support for connecting through IPv6 (#425 for #112) 2017-11-16 13:30:18 +01:00
Lonami Exo
959e824c1c Reduce indent level to simplify flow on __call__ 2017-11-16 13:26:49 +01:00
Lonami Exo
778c844a64 Use logger.exception instead logger.error on ReadThread 2017-11-16 13:25:13 +01:00
Lonami Exo
b346561f89 Remove unnecessary call to .get_input_entity() 2017-11-16 13:24:32 +01:00
Lonami Exo
a1c669333e Update scheme to layer 73 2017-11-15 12:22:37 +01:00
Lonami
48e96ca15f
Fix ._get_connected failing when .fileno() == 0 ( #427) 2017-11-14 12:01:33 +01:00
Lonami Exo
d59b17c6fc Clear up confusing error and trailing brace (closes #429) 2017-11-14 09:48:40 +01:00
Lonami Exo
bfc408b00a Use NullHandler as default for the library 2017-11-13 10:59:43 +01:00
Lonami Exo
4ac88a1505 Use ._logger.exception when .connect fails (#373) 2017-11-13 10:58:10 +01:00