Add setStickerSetThumbnail.format parameter.

This commit is contained in:
levlam 2024-03-18 14:17:05 +03:00
parent 538fc78fa6
commit a872d60362

View File

@ -11035,10 +11035,16 @@ td::Status Client::process_set_sticker_set_thumbnail_query(PromisedQueryPtr &que
if (thumbnail == nullptr) {
thumbnail = get_input_file(query.get(), "thumb");
}
td::Slice sticker_format_str = query->arg("format");
if (sticker_format_str.empty()) {
sticker_format_str = td::Slice("auto");
}
TRY_RESULT(sticker_format, get_sticker_format(sticker_format_str));
check_user(user_id, std::move(query),
[this, user_id, name, thumbnail = std::move(thumbnail)](PromisedQueryPtr query) mutable {
send_request(
make_object<td_api::setStickerSetThumbnail>(user_id, name.str(), std::move(thumbnail), nullptr),
[this, user_id, name, thumbnail = std::move(thumbnail),
sticker_format = std::move(sticker_format)](PromisedQueryPtr query) mutable {
send_request(make_object<td_api::setStickerSetThumbnail>(user_id, name.str(), std::move(thumbnail),
std::move(sticker_format)),
td::make_unique<TdOnOkQueryCallback>(std::move(query)));
});
return td::Status::OK();