diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index f61c2420f..fce8d5f1a 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -7065,7 +7065,7 @@ getArchivedStickerSets sticker_type:StickerType offset_sticker_set_id:int64 limi //@limit The maximum number of sticker sets to be returned; up to 100. For optimal performance, the number of returned sticker sets is chosen by TDLib and can be smaller than the specified limit, even if the end of the list has not been reached getTrendingStickerSets sticker_type:StickerType offset:int32 limit:int32 = TrendingStickerSets; -//@description Returns a list of sticker sets attached to a file. Currently, only photos and videos can have attached sticker sets @file_id File identifier +//@description Returns a list of sticker sets attached to a file, including regular, mask, and emoji sticker sets. Currently, only animations, photos, and videos can have attached sticker sets @file_id File identifier getAttachedStickerSets file_id:int32 = StickerSets; //@description Returns information about a sticker set by its identifier @set_id Identifier of the sticker set diff --git a/td/telegram/StickersManager.cpp b/td/telegram/StickersManager.cpp index df9ceb9b1..06f9134bc 100644 --- a/td/telegram/StickersManager.cpp +++ b/td/telegram/StickersManager.cpp @@ -8095,10 +8095,6 @@ vector StickersManager::get_attached_sticker_file_ids(const vectortype_ == StickerType::CustomEmoji) { - // custom emoji stickers can't can be attached to files - continue; - } auto file_view = td_->file_manager_->get_file_view(file_id); CHECK(!file_view.empty()); @@ -8116,7 +8112,7 @@ vector StickersManager::get_attached_sticker_file_ids(const vectorauth_manager_->is_bot()) { + if (!td_->auth_manager_->is_bot() && s->type_ != StickerType::CustomEmoji) { add_recent_sticker_by_id(true, file_id); } }