From c3e0a8022aed6349d948b9189382ab62b9cb7a29 Mon Sep 17 00:00:00 2001 From: levlam Date: Thu, 21 Mar 2024 15:38:48 +0300 Subject: [PATCH] Allow to add arbitrary WEBM stickers to recent and favorite. --- td/generate/scheme/td_api.tl | 4 ++-- td/telegram/StickersManager.cpp | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 2a8b07009..27c662a15 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -9370,7 +9370,7 @@ reorderInstalledStickerSets sticker_type:StickerType sticker_set_ids:vectorset_id_.is_valid() && sticker->format_ != StickerFormat::Webp) { + if (!sticker->set_id_.is_valid() && sticker->format_ != StickerFormat::Webp && + sticker->format_ != StickerFormat::Webm) { return promise.set_error(Status::Error(400, "The sticker must be from a sticker set")); } if (sticker->type_ == StickerType::CustomEmoji) { @@ -9425,7 +9426,8 @@ void StickersManager::add_favorite_sticker_impl(FileId sticker_id, bool add_on_s if (sticker == nullptr) { return promise.set_error(Status::Error(400, "Sticker not found")); } - if (!sticker->set_id_.is_valid() && sticker->format_ != StickerFormat::Webp) { + if (!sticker->set_id_.is_valid() && sticker->format_ != StickerFormat::Webp && + sticker->format_ != StickerFormat::Webm) { return promise.set_error(Status::Error(400, "The sticker must be from a sticker set")); } if (sticker->type_ == StickerType::CustomEmoji) {