diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 9dd76f9ea..e9c774c82 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -9272,7 +9272,7 @@ clearRecentStickers is_attached:Bool = Ok; getFavoriteStickers = Stickers; //@description Adds a new sticker to the list of favorite stickers. The new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. -//-Only stickers belonging to a sticker set can be added to this list. Emoji stickers can't be added to favorite stickers +//-Only stickers belonging to a sticker set or in WEBP format can be added to this list. Emoji stickers can't be added to favorite stickers //@sticker Sticker file to add addFavoriteSticker sticker:InputFile = Ok; diff --git a/td/telegram/StickersManager.cpp b/td/telegram/StickersManager.cpp index c55540fc5..49f68a421 100644 --- a/td/telegram/StickersManager.cpp +++ b/td/telegram/StickersManager.cpp @@ -8920,7 +8920,7 @@ void StickersManager::add_recent_sticker_impl(bool is_attached, FileId sticker_i return promise.set_error(Status::Error(400, "Sticker not found")); } if (!sticker->set_id_.is_valid() && sticker->format_ != StickerFormat::Webp) { - return promise.set_error(Status::Error(400, "Stickers must be from a sticker set")); + return promise.set_error(Status::Error(400, "The sticker must be from a sticker set")); } if (sticker->type_ == StickerType::CustomEmoji) { return promise.set_error(Status::Error(400, "Custom emoji stickers can't be added to recent")); @@ -9300,8 +9300,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()) { - return promise.set_error(Status::Error(400, "Stickers without sticker set can't be added to favorite")); + if (!sticker->set_id_.is_valid() && sticker->format_ != StickerFormat::Webp) { + return promise.set_error(Status::Error(400, "The sticker must be from a sticker set")); } if (sticker->type_ == StickerType::CustomEmoji) { return promise.set_error(Status::Error(400, "Custom emoji stickers can't be added to favorite"));