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
Lonami Exo
638eeb3c82
Fix attributes not being inferred for open()ed files
2018-07-31 12:14:13 +02:00
Lonami
223b007a55
Fix get_message_id after custom message patch
2018-07-29 15:49:12 +02:00
Lonami Exo
d8fa0c81f6
Fix-up 52292d7
accessing types under the wrong module
2018-07-23 12:19:41 +02:00
Lonami Exo
52292d77fb
Use types. namespace in utils
2018-07-22 19:40:00 +02:00
Lonami Exo
ace7254344
Fix classes MRO and abstractmethod usage
...
Furthermore utils needs to access the message by reference
through types.Message because it is patched and replaced.
2018-07-22 19:26:34 +02:00
Lonami Exo
a9cc35e604
Avoid triggering FileMigrateError when possible
2018-07-21 11:59:44 +02:00
Lonami Exo
2d7c8908eb
Create events.InlineQuery
2018-07-15 11:31:24 +02:00
Lonami Exo
3b3b148a43
Revert add_mark parameter on utils.get_peer_id
...
And a fix for -1000 IDs that wasn't being accounted for.
2018-07-07 12:44:21 +02:00
Lonami Exo
baedd10110
Update to layer 82
2018-06-29 13:23:56 +02:00
Lonami Exo
d64eb7ea2b
Avoid cyclic imports on older Python versions
2018-06-29 11:04:42 +02:00
Lonami Exo
2bd0c6c525
Support URLs on send_file
2018-06-26 16:39:22 +02:00
Lonami Exo
3973755333
Support .name attr in utils.is_type/client.upload_file
...
This means open()'ed files will have their name used properly,
and that you can set b.name = 'somename.jpg' to io.BytesIO()
objects to have them uploaded as images.
2018-06-21 16:31:03 +02:00
Lonami Exo
4d1272f1d2
Fix __ is invalid in usernames (cc @Kyle2142)
2018-06-17 12:08:55 +02:00
Lonami
bb3a564500
Merge pull request #843 from LonamiWebs/core-rewrite
...
Core rewrite
2018-06-14 16:25:28 +02:00
Lonami Exo
317b7053a0
Separate parse message methods from uploads
2018-06-10 11:33:20 +02:00