mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-12-29 13:45:49 +01:00
Add setStickerSetThumbnail.format parameter.
This commit is contained in:
parent
538fc78fa6
commit
a872d60362
@ -11035,11 +11035,17 @@ td::Status Client::process_set_sticker_set_thumbnail_query(PromisedQueryPtr &que
|
|||||||
if (thumbnail == nullptr) {
|
if (thumbnail == nullptr) {
|
||||||
thumbnail = get_input_file(query.get(), "thumb");
|
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),
|
check_user(user_id, std::move(query),
|
||||||
[this, user_id, name, thumbnail = std::move(thumbnail)](PromisedQueryPtr query) mutable {
|
[this, user_id, name, thumbnail = std::move(thumbnail),
|
||||||
send_request(
|
sticker_format = std::move(sticker_format)](PromisedQueryPtr query) mutable {
|
||||||
make_object<td_api::setStickerSetThumbnail>(user_id, name.str(), std::move(thumbnail), nullptr),
|
send_request(make_object<td_api::setStickerSetThumbnail>(user_id, name.str(), std::move(thumbnail),
|
||||||
td::make_unique<TdOnOkQueryCallback>(std::move(query)));
|
std::move(sticker_format)),
|
||||||
|
td::make_unique<TdOnOkQueryCallback>(std::move(query)));
|
||||||
});
|
});
|
||||||
return td::Status::OK();
|
return td::Status::OK();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user