Commit Graph

1963 Commits

Author SHA1 Message Date
Lonami Exo
628a16f287 Document new errors and limits for inline results 2019-02-14 19:45:25 +01:00
Lonami Exo
41bfb8ae52 Fix photo resizing not working for images with alpha channels 2019-02-14 12:12:17 +01:00
Lonami Exo
d1c755809d Except RpcMcgetFailError as call fail and sleep on server errors
This one in particular may happen when iterating over messages,
perhaps more likely to happen if the group was created in a
different data center.

A small sleep of a few seconds also greatly increases the
chances of the error going away.
2019-02-14 11:00:37 +01:00
nosanity
2e544270cd Fix login failure due to wrong argument name (#1109) 2019-02-14 16:46:57 +10:00
Lonami Exo
5bb2d9adf3 Document common usages for upload_file 2019-02-13 12:50:14 +01:00
Lonami Exo
559a40c7ea Fix get_input_media for InputFile
It was actually using FileLocation, which had the invalid expected
type for what was being returned. Instead it should have been this
other type.

In addition, more parameters are passed so that the method can have
all the information it needs to correctly cast the type.
2019-02-13 12:33:11 +01:00
Lonami Exo
99ad26bfa4 Lower the maximum amount of requests per container 2019-02-13 10:16:59 +01:00
Lonami Exo
5c85f830bd Further document automatic photo resizing 2019-02-13 09:58:02 +01:00
Lonami Exo
fd24f7087e Resize photos when sending files if needed 2019-02-13 09:50:00 +01:00
Lonami Exo
5772a5483c Check dc_id in resolve_bot_file_id 2019-02-13 09:16:34 +01:00
Lonami Exo
47d9de98ed Raise ImportError and not ValueError when sqlite3 is missing
Excepting ValueError when creating the SQLiteSession could hide
other errors (e.g. using a newer session file on an older version
of the library). Instead, the original error is raised, as if
sqlite3 was being imported within its __init__ method.
2019-02-13 08:52:54 +01:00
Dmitry D. Chernov
d25442345e Fix incorrect sending of DC id when connecting to MTProxy 2019-02-12 21:17:08 +10:00
Lonami Exo
4899788d92 Expose phone and phone_code_hash in sign_up 2019-02-12 11:44:36 +01:00
Lonami Exo
bf11bbd8a6 Support sending bytes/stream as photos (improved _get_extension)
Letting _get_extension work for photos even when the only information
available is a stream or a few bytes allows sending arbitrary bytes
as photos, if force_document was not set to True explicitly.
2019-02-12 11:33:06 +01:00
Lonami Exo
8f8ae9aee5 Update URLs in assistant and except message deletion errors 2019-02-12 10:48:02 +01:00
Lonami Exo
1007e19172 Fix get_peer_id not working with InputPeerSelf 2019-02-11 10:40:35 +01:00
Dmitry D. Chernov
3b4d00564d Detail docstring about the 'proxy' parameter in TelegramClient 2019-02-11 18:54:35 +10:00
Dmitry D. Chernov
45d0ba9e2f Initial implementation of MTProxy support (#1107) 2019-02-11 00:16:46 +01:00
Dmitry D. Chernov
45fdd098cc Docs: Removed mention of TcpClient from 'Project Structure' 2019-02-11 08:45:33 +10:00
Dmitry D. Chernov
8c428e8566 Fix broken connection establishment in ConnectionTcpObfuscated
This regression was introduced in ebde3be820.
2019-02-11 07:54:59 +10:00
Dmitry D. Chernov
c39cc06908 Fix incorrect check for reserved data prefix in ConnectionTcpObfuscated 2019-02-11 05:47:09 +10:00
Lonami Exo
de84bf08bf Support MessageMedia in pack_bot_file_id 2019-02-10 12:30:20 +01:00
Lonami Exo
e23308c0f9 Fix accessing conversation messages that arrived too early 2019-02-10 11:46:39 +01:00
Dmitry D. Chernov
9a98d41a2c Improve TakeoutClient proxy and takeout functionality (#1106) 2019-02-10 11:10:41 +01:00
Dmitry D. Chernov
274fa72a8c Correctly proxy __class__ in TakeoutClient for #1103 (#1105) 2019-02-07 16:51:16 +01:00
Lonami Exo
abd26af0ad Update misleading error message 2019-02-07 10:16:03 +01:00
Dmitry D. Chernov
fc2977fc0d Tiny style fixes 2019-02-07 06:55:34 +10:00
Dmitry D. Chernov
c8f16a4e89 Fix a couple of inconsistencies in the public interface (#1102)
* Create `_NOT_A_REQUEST` when needed. Currently, modifications    
  in the raised exception would be "global".    
* `retries` parameters were actually attempts. This has been fixed    
  to actually be the amount of retries, so 0 now means don't retry.    
* Helper function to deal with retries instead of using a range with    
  different styles every time.
2019-02-06 19:41:45 +01:00
Thorbijoern
c9e9b82eac Update resolve_bot_file_id to latest layer (#1100)
It is now possible to replace the dummy image with None.
2019-02-03 00:14:39 +01:00
Lonami Exo
b79c4510a6 Update to v1.5.5 2019-02-02 11:36:38 +01:00
Lonami Exo
c2c8a3caeb Saner timeouts for conversation (#1099) 2019-01-31 11:11:20 +01:00
Lonami Exo
8492300780 Fix search in private chats when from_user was not given 2019-01-31 11:11:20 +01:00
Lonami Exo
cf867954c3 Support any of /sS to focus docs search 2019-01-26 13:15:27 +01:00
Lonami Exo
c11d71c3cd Fix docs generation on Windows and search bar 2019-01-26 13:15:27 +01:00
Lonami Exo
c1ae7d67a9 Update readthedocs with the new ChatAdminRights 2019-01-24 14:12:35 +01:00
Lonami Exo
10cd61d2f9 Add missing timezone info in important places
Things like SQLAlchemy work correctly only for timezone-aware datetimes.
The returned TLObjects all have them, but those that are manually created
were missing them, so serializing the state into SQLAlchemy sessions failed.
2019-01-24 11:16:40 +01:00
Lonami Exo
86a8928278 Better error diagnostics and fix parsing errors.csv 2019-01-24 11:02:58 +01:00
Lonami Exo
d1fee27814 Register several known mimetypes (#1096) 2019-01-23 14:37:40 +01:00
Lonami Exo
33742c809a Document BANNED_RIGHTS_INVALID 2019-01-23 14:37:40 +01:00
Kirill
747caf1652 Support Path-like values for thumb in _file_to_media (#1095) 2019-01-22 18:52:53 +01:00
Lonami Exo
bb5c1f24c6 Update to layer 93 2019-01-21 20:09:13 +01:00
Lonami Exo
8f44364c6c Add supports_streaming to send_file and update docs/errors 2019-01-21 19:47:17 +01:00
Lonami Exo
b0883148f5 Document more RPC errors
These two occur when replying to an inline query with a photo and
InputBotInlineMessageMediaAuto empty message, and passing URLs to
PNGs that may not be accessible (i.e. 403 from pixiv).
2019-01-17 16:51:50 +01:00
Lonami Exo
09e58c4e53 Add more missing loggers parameters #1089 2019-01-15 11:09:08 +01:00
Lonami Exo
61593279c9 Update to v1.5.3 2019-01-14 14:26:14 +01:00
Lonami Exo
51f0bf5d84 Fully support email in edit_2fa 2019-01-14 13:57:07 +01:00
Lonami
21545c56bb
Add yet another missing file_reference 2019-01-13 20:40:51 +01:00
Lonami
be4f89740a
Fix resolve_bot_file_id for photos 2019-01-13 20:38:16 +01:00
Lonami Exo
5ac88f764d Fix and update links in the documentation 2019-01-12 13:06:14 +01:00
Lonami Exo
fbf7f75b00 Fix send_message with buttons not always returning ReplyMarkup 2019-01-12 12:53:21 +01:00