TBA 5.7: Add InputSticker::Webm

This commit is contained in:
Maybe Waffle 2022-02-01 19:39:29 +03:00
parent b1f10c91cc
commit 6384560195
2 changed files with 8 additions and 3 deletions

View file

@ -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)
}

View file

@ -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),
}