Add BotInfoManager::reload_bot_media_previews.
This commit is contained in:
parent
5a5a9a28a4
commit
8396faa832
@ -448,6 +448,18 @@ void BotInfoManager::get_bot_media_previews(UserId bot_user_id,
|
||||
td_->create_handler<GetPreviewMediasQuery>(std::move(promise))->send(bot_user_id, std::move(input_user));
|
||||
}
|
||||
|
||||
void BotInfoManager::reload_bot_media_previews(UserId bot_user_id, Promise<Unit> &&promise) {
|
||||
get_bot_media_previews(
|
||||
bot_user_id, PromiseCreator::lambda([promise = std::move(promise)](
|
||||
Result<td_api::object_ptr<td_api::botMediaPreviews>> result) mutable {
|
||||
if (result.is_error()) {
|
||||
promise.set_error(result.move_as_error());
|
||||
} else {
|
||||
promise.set_value(Unit());
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
void BotInfoManager::add_pending_set_query(UserId bot_user_id, const string &language_code, int type,
|
||||
const string &value, Promise<Unit> &&promise) {
|
||||
pending_set_bot_info_queries_.emplace_back(bot_user_id, language_code, type, value, std::move(promise));
|
||||
|
@ -32,6 +32,8 @@ class BotInfoManager final : public Actor {
|
||||
|
||||
void get_bot_media_previews(UserId bot_user_id, Promise<td_api::object_ptr<td_api::botMediaPreviews>> &&promise);
|
||||
|
||||
void reload_bot_media_previews(UserId bot_user_id, Promise<Unit> &&promise);
|
||||
|
||||
void set_bot_name(UserId bot_user_id, const string &language_code, const string &name, Promise<Unit> &&promise);
|
||||
|
||||
void get_bot_name(UserId bot_user_id, const string &language_code, Promise<string> &&promise);
|
||||
|
Loading…
Reference in New Issue
Block a user