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
bd4218c238
Merge branch 'master' into input_file_refactor
2022-01-30 20:14:30 +06:00
Maybe Waffle
38f2a5fef2
Make WebhookInfo::ip_address
typed
2022-01-27 20:25:40 +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
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
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
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
Hirrolot
dad5d5d4b1
Merge pull request #156 from teloxide/tolerant_updates_for_all
...
Make update deserialization fault tolerant by default
2022-01-12 15:19:24 +07:00
Waffle Maybe
53df041940
Merge pull request #163 from zggff/master
...
make OrderInfo use Option<String> instead of String. It allows teloxide to ask only one needed field of the shipping query.
2022-01-12 11:18:37 +03:00
Hirrolot
1bcf621c7d
Merge branch 'master' into tolerant_updates_for_all
2022-01-12 15:14:37 +07:00
Hirrolot
95dc6e5881
Merge pull request #162 from teloxide/tba_5.6
...
Add support for TBA 5.6
2022-01-12 15:10:47 +07:00
Maybe Waffle
488492e9e5
Move Chat::has_protected_content
to ChatPublic
2022-01-11 16:12:02 +03:00
Maybe Waffle
22159867bb
Add Chat::has_protected_content
2022-01-11 15:51:28 +03:00
zggff
b72df9b657
make successful payment use OrderInfo; derive Default on OrderInfo
2022-01-05 10:58:53 +03:00
zggff
1d0ff0a0f6
make OrderInfo use Option<String> instead of String
2022-01-04 23:21:48 +03:00
Maybe Waffle
7223270b32
Add support for TBA 5.6
2022-01-03 21:41:57 +03:00
Waffle Maybe
4af317e1fd
Merge pull request #159 from Mr-Andersen/master
...
Fix deserializing `Document`
2022-01-02 19:55:54 +03:00
Андрей Власов
3047bea3ab
Use serde(default)
where applicable
2022-01-02 19:43:37 +03:00
Waffle Maybe
22d2586949
Merge pull request #160 from teloxide/fix_cfg_docs
...
Fix `doc(cfg)` implication
2022-01-02 19:31:50 +03:00
Maybe Waffle
4d0ed16054
Fix doc(cfg)
implication
2022-01-02 19:20:56 +03:00
Андрей Власов
19bcd8a6ba
Remove unnecessary code
2022-01-02 18:35:14 +03:00
Андрей Власов
db8175e9f9
Fix deserializing Document
2022-01-02 18:34:49 +03:00
Андрей Власов
93690a3417
Fix "no test
in tokio
"
2022-01-02 18:33:15 +03:00
Maybe Waffle
ea67c634ad
Fix clippy
2021-12-29 23:15:38 +03:00
Maybe Waffle
59720c1e0b
Remove get_updates_fault_tolerant
and SemiparsedVec
2021-12-29 21:35:30 +03:00
Maybe Waffle
62e9e8afd4
Make ChatPermissions into bitflags
2021-12-29 20:36:08 +03:00
Maybe Waffle
648b5b7377
Make UpdateKind
deserialization fault tolerant
2021-12-29 18:06:28 +03:00
Waffle Maybe
fd3ef0bdf3
Merge pull request #154 from teloxide/bot_command_scope_fix
...
Fix serialization of `BotCommandScope::Chat{,Administrators}`
2021-12-28 17:07:46 +03:00
Maybe Waffle
f456ab110a
Add ApiError::NotEnoughRightsToChangeChatPermissions
2021-12-28 17:04:19 +03:00
Maybe Waffle
f65617e763
Fix serialization of BotCommandScope::Chat{,Administrators}
2021-12-28 16:09:40 +03:00
Hirrolot
ff21d876c4
Merge branch 'master' into fix_some_message_deserialization_bugs
2021-12-28 19:49:08 +07:00
Hirrolot
54f4281754
Merge pull request #150 from teloxide/invalid_json_raw
...
Add `RequestError::InvalidJson::raw` field
2021-12-25 14:03:58 +06:00
Waffle Maybe
468b0c9379
Merge pull request #153 from teloxide/more_message_serialization_bug_fixes
...
Fix deserialization of `VoiceChat{Started,Ended}` messages
2021-12-25 11:02:55 +03:00
Maybe Waffle
9ce53a2b02
Fix deserialization of VoiceChat{Started,Ended}
messages
2021-12-25 04:50:31 +03:00
Maybe Waffle
34647c7a38
Improve debug_assert!
message in ChatId::unmark
2021-12-25 04:34:05 +03:00
Maybe Waffle
078ee1d7ce
Refactor forwarded messages
2021-12-25 04:27:13 +03:00
Maybe Waffle
2bd19a598e
Add User::is_anonymous
and User::is_channel
functions
...
Also add documentation for `User::{full_name, mention, url}`
2021-12-25 04:12:59 +03:00