mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-14 11:44:04 +01:00
TBA 5.7: Add InputSticker::Webm
This commit is contained in:
parent
b1f10c91cc
commit
6384560195
2 changed files with 8 additions and 3 deletions
|
@ -434,13 +434,13 @@ impl InputFileLike for Option<InputFile> {
|
|||
|
||||
impl InputFileLike for InputSticker {
|
||||
fn copy_into(&self, into: &mut dyn FnMut(InputFile)) {
|
||||
let (InputSticker::Png(input_file) | InputSticker::Tgs(input_file)) = self;
|
||||
let (Self::Png(input_file) | Self::Tgs(input_file) | Self::Webm(input_file)) = self;
|
||||
|
||||
input_file.copy_into(into)
|
||||
}
|
||||
|
||||
fn move_into(&mut self, into: &mut dyn FnMut(InputFile)) {
|
||||
let (InputSticker::Png(input_file) | InputSticker::Tgs(input_file)) = self;
|
||||
let (Self::Png(input_file) | Self::Tgs(input_file) | Self::Webm(input_file)) = self;
|
||||
|
||||
input_file.move_into(into)
|
||||
}
|
||||
|
|
|
@ -27,7 +27,12 @@ pub enum InputSticker {
|
|||
|
||||
/// TGS animation with the sticker, uploaded using multipart/form-data.
|
||||
///
|
||||
/// See <https://core.telegram.org/animated_stickers#technical-requirements> for technical requirements
|
||||
/// See <https://core.telegram.org/animated_stickers#technical-requirements> for technical requirements.
|
||||
#[serde(rename = "tgs_sticker")]
|
||||
Tgs(InputFile),
|
||||
|
||||
/// WEBM video with the sticker, uploaded using multipart/form-data.
|
||||
///
|
||||
/// See <https://core.telegram.org/stickers#video-sticker-requirements> for technical requirements.
|
||||
Webm(InputFile),
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue