Commit Graph

138 Commits

Author SHA1 Message Date
Hasan
4b74d16438 Fix file_id error checking (#1189) 2019-05-19 22:18:35 +02:00
Lonami Exo
fefd6f0e6d Fix use of tg://join?invite= channels 2019-05-12 13:44:09 +02:00
Lonami Exo
0a3d6106f0 Completely overhaul the documentation 2019-05-09 12:50:09 +02:00
Lonami Exo
10251f9782 Create a new Message.file property (#1168) 2019-05-08 18:41:40 +02:00
Lonami Exo
c6691dc6a8 Update the reference with even more types and other docs 2019-05-07 21:25:55 +02:00
Lonami Exo
19398d75be Add support for hexadecimal invite links 2019-05-05 11:56:04 +02:00
Lonami Exo
1e17ef1c98 Apply several lints 2019-05-03 21:38:41 +02:00
Lonami Exo
3a1496c205 Reuse code for _get_entity_pair
Less error-prone, improved the function flow for all callers,
and removed some duplicate work.
2019-05-01 17:52:32 +02:00
Lonami Exo
c12c65f728 Let utils.get_peer handle DialogPeer
This is important since some updates have a peer of
that type instead of just the normal Peer instance.
2019-05-01 12:49:36 +02:00
Lonami Exo
1666976646 Fix-up stripped_photo_to_jpg from the previous commit 2019-04-25 20:37:48 +02:00
YoilyL
b0e96b2821 Fix stripped image downloads (#1165) 2019-04-25 20:31:52 +02:00
Lonami Exo
21aec00e46 Fix downloading photos with download_file (#1164) 2019-04-24 12:37:19 +02:00
Lonami Exo
bb23bc0fd2 Finish update to layer 98 2019-04-22 19:05:25 +02:00
Lonami Exo
8868ce14e8 Update to layer 98 2019-04-22 16:51:05 +02:00
Lonami Exo
5e5fe5876a Fix mimetype for mp3 files
It was incorrectly audio/mp3, when audio/mpeg is the correct one.
This was causing sending mp3 voice notes to not work.
2019-04-04 10:10:54 +02:00
Lonami Exo
0f69455dc7 Handle hachoir metadata more gracefully, bump 1.6.2
Since bf11bbd _get_extension supports plenty more things,
which hachoir cannot deal with. Add some extra safety checks.
2019-03-04 08:58:32 +01:00
Wirtos
c4d65f8bf4 ValueError fix for IOBase files (#1119) 2019-03-01 21:27:15 +01:00
Lonami Exo
8e36c0002b Fix sending albums with bot file IDs 2019-02-25 18:23:39 +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
5772a5483c Check dc_id in resolve_bot_file_id 2019-02-13 09:16:34 +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
de84bf08bf Support MessageMedia in pack_bot_file_id 2019-02-10 12:30:20 +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
d1fee27814 Register several known mimetypes (#1096) 2019-01-23 14:37:40 +01:00
Lonami Exo
8f44364c6c Add supports_streaming to send_file and update docs/errors 2019-01-21 19:47:17 +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
d892a537a7 Support get_peer on participants and clarify some strings 2019-01-07 16:13:37 +01:00
Lonami Exo
619e4dc2d6 Fix get_peer for int which made ab557a8 useless 2018-12-28 17:54:15 +01:00
Lonami Exo
18f457a41d Add missing file_reference to InputDocument 2018-12-25 01:04:45 +01:00
Lonami Exo
ab557a8cef Use getUsers/getChannels with hash 0 on get_input_entity 2018-12-24 17:32:16 +01:00
Lonami Exo
7100b75598 Update to layer 89
This breaks edit_2fa
2018-12-18 16:37:07 +01:00
Lonami Exo
5018879f84 Raise TypeError in get_input_peer if access_hash is None
When auto-casting to input peers if the access hash is now None,
the ID will be used to look-up a cached access hash which will
solve some common pitfalls (using full entities when only the
input variant should and could be used).
2018-12-15 12:23:14 +01:00
udf
5b2cfffedc make utils.get_peer_id raise with message about InputPeerSelf 2018-11-23 16:39:31 +01:00
udf
9362f03fd5 fix utils.get_peer not raising in some cases 2018-11-23 16:39:31 +01:00
Lonami Exo
8c14259728 Update documentation with new sections 2018-10-06 20:20:11 +02:00
josephbiko
3dd8b7c6d1 Support async def in sessions (#1013) 2018-10-05 20:25:49 +02:00
Lonami Exo
d392939018 Create a default module to use as a sentinel value
This looks better in the documentation than utils.Default,
cleans the utils with specific stuff like this, and users
may use it more easily.
2018-10-05 14:20:50 +02:00
Lonami Exo
0fcc2e5e52 Add autocast for InputDocument and InputChatPhoto 2018-10-05 14:11:47 +02:00
Lonami Exo
ec0aa65fe1 An user -> a user 2018-09-22 19:18:42 +02:00
udf
3ef2416138 Add method to resolve inline message IDs (#1005) 2018-09-19 14:22:35 +02:00
Wirtos
36df6d1bf9 Manually register ogg mimetype too (#973) 2018-08-28 21:17:10 +02:00
Lonami Exo
0e91fc3668 Manually register webp mimetype
Otherwise, sending stickers would fail on some systems.
2018-08-27 17:19:10 +02:00
Lonami Exo
44558cc592 Add utils.resolve_bot_file_id inverse 2018-08-06 17:54:07 +02:00
Lonami Exo
7cce7aa3e4 Return helpers.TotalList instances on client.get_ methods 2018-08-02 23:00:10 +02:00
Lonami Exo
3612652f39 Use builtin base64.urlsafe_b64decode and fix docstring 2018-08-02 13:59:27 +02:00
Lonami Exo
2ca8ddbfb4 Use cache for invite links 2018-08-02 13:47:35 +02:00
Lonami Exo
10da14418c Create utils.get_peer 2018-08-02 12:56:40 +02:00
Lonami Exo
76c7217000 Support downloading web documents 2018-08-01 00:37:25 +02:00
Lonami Exo
972950fc2e Create utils.resolve_bot_file_id 2018-07-31 23:35:07 +02:00