Commit Graph

2806 Commits

Author SHA1 Message Date
Lonami Exo
4c771bf2af Fix setting logout result was not checking for future cancellation 2021-02-27 15:14:44 +01:00
Lonami Exo
292a36f760 Handle DestroySessionRes
Should close #1706.
2021-02-27 15:13:53 +01:00
Lonami Exo
a955138021 Fix invoking requests ordered
Closes #1709.
2021-02-27 15:03:05 +01:00
Lonami Exo
b475a2ecc6 Add a new docs page for Chats vs Channels 2021-02-23 20:58:36 +01:00
Lonami Exo
175b30faf8 Add new event types to AdminLogEvent 2021-02-23 20:10:51 +01:00
Lonami Exo
0d05d0d8f5 Update message to include ttl_period 2021-02-23 19:42:09 +01:00
Andrew Lane
2c2a07d02f
Update to layer 124 (#1708) 2021-02-23 13:04:50 +01:00
Lonami Exo
0e8bd8248c Fix patched module was never automatically imported
Closes #1701. It has to be imported late in the process of
`import telethon` for its side-effects.
2021-02-14 00:26:04 +01:00
Lonami Exo
ff3c21c805 Update file.size to reflect the size of the largest thumbnail
This way we avoid relying on the order of the thumbnails, and just
pick the largest.
2021-02-13 22:52:27 +01:00
Lonami Exo
b102f1f345 Handle progressive size in _photo_size_byte_count 2021-02-13 22:49:03 +01:00
Lonami Exo
73b9de2085 Correctly sort PhotoSizeProgressive thumb size 2021-02-13 22:47:34 +01:00
Lonami Exo
b0158b3f65 Fix download of PhotoSizeProgressive
Closes #1700.
2021-02-13 22:45:12 +01:00
Lonami Exo
75db9f70df Update proxy docs and license year 2021-02-12 17:56:46 +01:00
Lonami Exo
8f0de3d285 Fix TypeNotFoundError was not being propagated
Closes #1697. This would cause deadlocks, as the request future
would never be resolved, so await would wait forever.
2021-02-11 19:27:57 +01:00
Lonami Exo
845fe88451 Fix definition typo in patched module 2021-02-10 20:21:16 +01:00
Lonami Exo
9a47fdc1ee Move Message redefinitions back to patched
Fixes #1695. This matches the older behaviour better, although the
patched module is now written manually.
2021-02-10 20:18:29 +01:00
Lonami Exo
23041f398b Fix messages.search accidentally being used over getHistory
Introduced by 668dcd52ca (this commit
did change a lot more than it should have); the condition for search
was never updated to account for the non-None value.

Closes #1693.
2021-02-08 22:56:27 +01:00
Lonami Exo
acb066ad2e Fix patched import 2021-02-06 12:51:01 +01:00
Lonami Exo
b85f50e314 Try to fix new custom.Message again 2021-02-06 12:41:33 +01:00
Lonami Exo
79f6da2dac Update to layer 123 again 2021-02-06 12:35:53 +01:00
Lonami Exo
abe4b8d5b0 Fix docs and imports for custom.Message 2021-02-05 20:52:08 +01:00
Lonami Exo
0997e3fa9f Remove _log_exc workaround and NullHandler
It was added back in bfc408b probably due to a misunderstanding of
https://docs.python.org/3/howto/logging.html#configuring-logging-for-a-library.

The default behaviour of logging WARNING and above is good and
desirable (hiding unhandled exceptions in update handlers by default
was a big, accidental mistake). NullHandler is used to *prevent*
this good default, so it shouldn't be used in the first place.
2021-02-02 20:47:02 +01:00
Lonami Exo
9a0e030db8 Add patched module back for compatibility 2021-02-02 19:12:22 +01:00
Lonami Exo
b88ec4b814 Print unhandled errors to stderr if logging is not configured
This should mitigate "the code doesn't work but there are no errors"
situations. Users not wanting this behaviour can configure logging
with a high-enough level that won't print anything, or set a filter.
2021-01-30 13:47:28 +01:00
Lonami Exo
4cc9645d76 Fix send_message not forwarding comment_to to send_file 2021-01-30 10:39:45 +01:00
Lonami Exo
8c38d7fb0e Add missing parenthesis 2021-01-30 10:32:42 +01:00
Lonami Exo
a12b49fd40 Change error mapping to be case insensitive 2021-01-29 20:19:07 +01:00
Lonami Exo
584e2b3743 Update list of RPC errors 2021-01-28 21:18:14 +01:00
Lonami Exo
ea57db7aad Add comment_to parameter to more easily post comments 2021-01-28 21:05:20 +01:00
Lonami Exo
6f7640af18 Fix utils.resolve_id
…assuming get_peer_id is correct, as changed by 0d8497b.
2021-01-28 20:01:46 +01:00
Lonami Exo
055643bd01 Fix type hinting for custom.Message 2021-01-28 19:58:03 +01:00
Lonami Exo
4e73577d59 Update to layer 123 2021-01-28 19:48:01 +01:00
Lonami Exo
2117f8f54b Update to v1.19.1 2021-01-26 21:46:42 +01:00
Lonami Exo
320ab75818 Respect exif metadata when resizing photos
Closes #1663.
2021-01-26 21:44:11 +01:00
Lonami Exo
9a6bc5ae72 Update defaults and docs for video attributes
Closes #1679.
2021-01-26 21:10:21 +01:00
Lonami Exo
ad4c49aa18 Fix global message search 2021-01-26 21:07:44 +01:00
Googleplex
a886d609d9
Support sending album with URL photos (#1681)
Fixes #1408.
2021-01-25 08:31:25 +01:00
Lonami Exo
65bf0e4c45 Add missing importç 2021-01-24 01:38:44 +01:00
Lonami Exo
fa99f6a1af Try to handle TimeoutError during file download 2021-01-24 01:36:10 +01:00
Lonami Exo
b1d6bd564e Fix several typos
Closes #1674.
2021-01-20 18:50:45 +01:00
Lonami Exo
de7cf03ba7 Stop storing asyncio loop in TelegramClient
The loop parameter was ignored because it shouldn't be used, but
the fact it still stored the current loop on creation messes up
with asyncio.run.
2021-01-18 22:59:19 +01:00
Shrimadhav U K
3ddb0a3903
Fix thumbnail for TDesktop and Telegram X users (#1673) 2021-01-17 17:31:26 +01:00
Lonami Exo
00aa0a4bf1 Avoid duplicate del in Conversation._on_read 2021-01-14 23:05:49 +01:00
Lonami Exo
cd51c9e47c Get rid of the patched/ module
This may fix #1669.
2021-01-14 22:56:55 +01:00
Lonami
c0738a7ae1
Trigger GitHub Actions workflow on PRs too 2021-01-12 20:30:31 +01:00
Lonami
4bf1d67eba
Fix resolve_invite_link in Python 3.6 2021-01-12 20:04:34 +01:00
painor
c0ed709adf
Add new format to resolve invite link (#1670) 2021-01-12 19:50:27 +01:00
Lonami Exo
82d25a7e52 Fix payment example using the wrong line endings 2021-01-05 20:05:42 +01:00
Lonami Exo
3150726f32 Fix tiny documentation nits
Closes #1659.
2021-01-05 20:03:16 +01:00
Lonami Exo
b192c3e6a3 Update to v1.19 2021-01-05 19:58:41 +01:00