Allow to add emoji stickers to animations, photos and videos.

This commit is contained in:
levlam 2022-12-20 14:04:22 +03:00
parent 01c1bcc149
commit 164848cb8f
2 changed files with 2 additions and 6 deletions

View File

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

View File

@ -8095,10 +8095,6 @@ vector<FileId> StickersManager::get_attached_sticker_file_ids(const vector<int32
// only stickers from sticker sets can be attached to files
continue;
}
if (s->type_ == 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<FileId> StickersManager::get_attached_sticker_file_ids(const vector<int32
}
result.push_back(file_id);
if (!td_->auth_manager_->is_bot()) {
if (!td_->auth_manager_->is_bot() && s->type_ != StickerType::CustomEmoji) {
add_recent_sticker_by_id(true, file_id);
}
}