Commit graph

676 commits

Author SHA1 Message Date
Maybe Waffle
2dc4a915ba Add a way for long-running requests to increase network timeout 2022-02-14 19:52:43 +03:00
Waffle Maybe
fb53a82611
Merge pull request #179 from teloxide/r041
Release `0.4.1`
2022-02-13 21:13:30 +03:00
Maybe Waffle
bfb64665a6 Release 0.4.1 2022-02-13 21:08:40 +03:00
Waffle Maybe
a28bd4a4c1
Merge pull request #178 from teloxide/until_fixed
Fix `UntilDate` deserialization
2022-02-13 21:06:00 +03:00
Maybe Waffle
8d89fdccbd Fix Update de/serialization tests 2022-02-13 20:58:33 +03:00
Maybe Waffle
c0795f0dc9 Add regression test for issue 523 2022-02-13 20:53:58 +03:00
Maybe Waffle
fb523f153e Fix deserialization of UntilDate 2022-02-13 20:53:41 +03:00
Hirrolot
b60caab9dd
Merge pull request #177 from teloxide/r040
Dump version (-> 0.4.0)
2022-02-03 21:05:15 +06:00
Maybe Waffle
4f85b8dc03 Dump version (-> 0.4.0) 2022-02-03 17:48:36 +03:00
Waffle Maybe
d83f7180c4
Merge pull request #175 from teloxide/tba_5.7
TBA 5.7
2022-02-03 17:39:16 +03:00
Waffle Maybe
1c2a38eeb6
Merge pull request #173 from teloxide/docs_examples_blah
Change process of building docs
2022-02-03 17:38:52 +03:00
Waffle Maybe
6618aaf48d
Merge pull request #176 from Flattergaster/master
Fix deserialization of `ChatInviteLink::pending_join_request_count`
2022-02-02 23:04:57 +03:00
Flattergaster
82eb96b405 Fix deserialization of ChatInviteLink::pending_join_request_count 2022-02-02 22:38:03 +03:00
Maybe Waffle
c34a1386df Fix test 2022-02-01 21:14:09 +03:00
Maybe Waffle
1ae7544578 Update changelog 2022-02-01 20:22:20 +03:00
Maybe Waffle
044f33551e TBA 5.7: Add Sticker{,Set}::is_video 2022-02-01 20:12:26 +03:00
Maybe Waffle
6384560195 TBA 5.7: Add InputSticker::Webm 2022-02-01 19:39:29 +03:00
Waffle Maybe
b1f10c91cc
Merge pull request #174 from teloxide/typed_webhookinfo_allowed_updates
Make `WebhookInfo::allowed_updates` typed
2022-02-01 18:35:40 +03:00
Maybe Waffle
16630133db Add regression test for WebhookInfo with an empty url 2022-02-01 18:31:04 +03:00
Maybe Waffle
a36794c5d3 Make WebhookInfo::allowed_updates typed 2022-02-01 18:30:40 +03:00
Maybe Waffle
dde40e613f Change process of building docs
- introduce `docs` alias that does the right thing (tm)
- use `-Zrustdoc-scrape-examples`
2022-01-31 18:23:30 +03:00
Hirrolot
8556256e89
Merge pull request #167 from teloxide/input_file_refactor
`InputFile` refactor
2022-01-30 20:18:32 +06:00
Hirrolot
bd4218c238
Merge branch 'master' into input_file_refactor 2022-01-30 20:14:30 +06:00
Waffle Maybe
58259d6d45
Merge pull request #172 from teloxide/typed_ip_address
Make `WebhookInfo::ip_address` typed
2022-01-30 17:12:26 +03:00
Maybe Waffle
38f2a5fef2 Make WebhookInfo::ip_address typed 2022-01-27 20:25:40 +03:00
Hirrolot
e273c1de2f
Merge pull request #169 from teloxide/fix_h2_warnings
Remove redundant settings from `default_reqwest_settings`
2022-01-26 15:17:15 +06:00
Waffle Maybe
c68f9396b6
Merge pull request #170 from teloxide/update_tooling
Update clippy, rustfmt and toolchain
2022-01-26 09:35:30 +03:00
Waffle Maybe
487e335b41
Merge pull request #171 from teloxide/fix-typos-in-changelog
fix typos in changelog
2022-01-26 09:35:09 +03:00
Waffle Maybe
87a0718acb
fix typos in changelog 2022-01-25 15:15:04 +03:00
Maybe Waffle
cdc8047d84 Update clippy, rustfmt and toolchain 2022-01-25 02:10:23 +03:00
Maybe Waffle
6598ed9f42 Remove redundant settings from default_reqwest_settings 2022-01-19 22:34:12 +03:00
Maybe Waffle
df88d83cfd Fix documentation 2022-01-13 20:43:33 +03:00
Maybe Waffle
f13732cbb5 Update readme 2022-01-13 17:19:02 +03:00
Maybe Waffle
622b0d9232 Remove dbg!
:/
2022-01-13 17:14:55 +03:00
Maybe Waffle
bc440b9ea8 fix clippy 2022-01-13 17:14:24 +03:00
Maybe Waffle
ef33f9f66a Add more tests for multipart request serialization 2022-01-13 17:14:24 +03:00
Maybe Waffle
5b4ed3faa9 Allow sending impl AsyncRead
This commit adds `InputFile::read` constructor that creates `InputFile`
from an `impl AsyncRead + Send + Unpin + 'static`.

Internally this requires quite a bit of work, since we need to support
cloning `InputFile`s but the `AsyncRead` trait only allows us reading it
once.

To support this, if `InputFile` detects that it's shared, it reads the
contents of the `AsyncRead` into a buffer and then shares the buffer
(or an error if it has occured).
2022-01-13 17:14:24 +03:00
Maybe Waffle
a84e897db9 Refactor multipart requests
This removes the logic in the multipart serializer that unserialized
`InputFile`s from serde. Now `InputFile`s  are serialized either as
their value (for `FileId` and `Url`) or as an `attach://<id>` string
where `<id>` is replaced with some id unique for the file. The file data
itself is acquired through `MultipartPayload` trait.

Since the `<id>` must be the same while serializing the file with serde
and while acquiring data through `MultipartPayload` trait, `InputFile`
needs to store said id. As such, `InputFile` is now a structure with
private fields and it's structure can't be observed by users. The only
things that `InputFile` provides are
- Constructors (`url`, `file_id`, `file`, `memory`)
- File name setter
- `Clone` and `Debug` implementations
2022-01-13 17:14:13 +03:00
Waffle Maybe
828ab07162
Merge pull request #166 from zggff/master
fix issue with WebhookInfo not parsing correctly
2022-01-13 10:31:58 +03:00
Waffle Maybe
7958f37c60
Apply suggestions from code review 2022-01-13 10:28:33 +03:00
Waffle Maybe
cfb3c60a1c
Apply suggestions from code review 2022-01-13 10:05:46 +03:00
Giga Maxim
f02ed38bb7
update comment in src/types/webhook_info.rs
Co-authored-by: Waffle Maybe <waffle.lapkin@gmail.com>
2022-01-12 19:49:30 +03:00
Max Giga
f2d98fdb8a fixed serialization error not returning empty string 2022-01-12 19:47:35 +03:00
Max Giga
834c54c1d6 refactor_serialization_deserialization_of_url 2022-01-12 19:35:07 +03:00
Max Giga
ba2305dbe5 set empty url in WebhookInfo to None 2022-01-12 16:51:57 +03:00
Waffle Maybe
3ccb8f0cde
Merge pull request #165 from teloxide/remove_stray_generics
Remove stray generics
2022-01-12 13:55:29 +03:00
Maybe Waffle
4a04750790 Remove stray generics 2022-01-12 13:46:25 +03:00
Maybe Waffle
bed5805610 File refactor: specify InputFile-ish fields for multipart payloads 2022-01-12 12:21:51 +03:00
Maybe Waffle
96266228d8 File refactor: InputMedia: remove derive(Deserialize), add files` 2022-01-12 12:21:38 +03:00
Maybe Waffle
c92190e313 Un-seal MultipartPayload 2022-01-12 11:28:35 +03:00