Don't add standalone stickers to recent when they are sent.
This commit is contained in:
parent
c3e0a8022a
commit
ee030cf5f7
@ -9044,8 +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::Webm) {
|
(!add_on_server || (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) {
|
||||||
@ -9426,8 +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::Webm) {
|
(!add_on_server || (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