Allow to add arbitrary WEBM stickers to recent and favorite.
This commit is contained in:
parent
5acff85fa9
commit
c3e0a8022a
@ -9370,7 +9370,7 @@ reorderInstalledStickerSets sticker_type:StickerType sticker_set_ids:vector<int6
|
|||||||
getRecentStickers is_attached:Bool = Stickers;
|
getRecentStickers is_attached:Bool = Stickers;
|
||||||
|
|
||||||
//@description Manually adds a new sticker to the list of recently used 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.
|
//@description Manually adds a new sticker to the list of recently used 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 or in WEBP format can be added to this list. Emoji stickers can't be added to recent stickers
|
//-Only stickers belonging to a sticker set or in WEBP or WEBM format can be added to this list. Emoji stickers can't be added to recent stickers
|
||||||
//@is_attached Pass true to add the sticker to the list of stickers recently attached to photo or video files; pass false to add the sticker to the list of recently sent stickers
|
//@is_attached Pass true to add the sticker to the list of stickers recently attached to photo or video files; pass false to add the sticker to the list of recently sent stickers
|
||||||
//@sticker Sticker file to add
|
//@sticker Sticker file to add
|
||||||
addRecentSticker is_attached:Bool sticker:InputFile = Stickers;
|
addRecentSticker is_attached:Bool sticker:InputFile = Stickers;
|
||||||
@ -9385,7 +9385,7 @@ clearRecentStickers is_attached:Bool = Ok;
|
|||||||
getFavoriteStickers = Stickers;
|
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.
|
//@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 or in WEBP format 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 or WEBM format can be added to this list. Emoji stickers can't be added to favorite stickers
|
||||||
//@sticker Sticker file to add
|
//@sticker Sticker file to add
|
||||||
addFavoriteSticker sticker:InputFile = Ok;
|
addFavoriteSticker sticker:InputFile = Ok;
|
||||||
|
|
||||||
|
@ -9044,7 +9044,8 @@ void StickersManager::add_recent_sticker_impl(bool is_attached, FileId sticker_i
|
|||||||
if (sticker == nullptr) {
|
if (sticker == nullptr) {
|
||||||
return promise.set_error(Status::Error(400, "Sticker not found"));
|
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"));
|
return promise.set_error(Status::Error(400, "The sticker must be from a sticker set"));
|
||||||
}
|
}
|
||||||
if (sticker->type_ == StickerType::CustomEmoji) {
|
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) {
|
if (sticker == nullptr) {
|
||||||
return promise.set_error(Status::Error(400, "Sticker not found"));
|
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"));
|
return promise.set_error(Status::Error(400, "The sticker must be from a sticker set"));
|
||||||
}
|
}
|
||||||
if (sticker->type_ == StickerType::CustomEmoji) {
|
if (sticker->type_ == StickerType::CustomEmoji) {
|
||||||
|
Loading…
Reference in New Issue
Block a user