Support telegram_api::updateSavedReactionTags.

This commit is contained in:
levlam 2024-01-23 16:39:15 +03:00
parent 291cd4203a
commit 9a09125d62
4 changed files with 17 additions and 10 deletions

View File

@ -779,6 +779,10 @@ void ReactionManager::send_update_saved_messages_tags() {
send_closure(G()->td(), &Td::send_update, get_update_saved_messages_tags_object());
}
void ReactionManager::on_update_saved_reaction_tags() {
get_saved_messages_tags(Auto());
}
void ReactionManager::get_current_state(vector<td_api::object_ptr<td_api::Update>> &updates) const {
if (td_->auth_manager_->is_bot()) {
return;

View File

@ -68,6 +68,8 @@ class ReactionManager final : public Actor {
void get_saved_messages_tags(Promise<td_api::object_ptr<td_api::savedMessagesTags>> &&promise);
void on_update_saved_reaction_tags();
void get_current_state(vector<td_api::object_ptr<td_api::Update>> &updates) const;
private:

View File

@ -3712,6 +3712,11 @@ void UpdatesManager::on_update(tl_object_ptr<telegram_api::updateRecentReactions
promise.set_value(Unit());
}
void UpdatesManager::on_update(tl_object_ptr<telegram_api::updateSavedReactionTags> update, Promise<Unit> &&promise) {
td_->reaction_manager_->on_update_saved_reaction_tags();
promise.set_value(Unit());
}
void UpdatesManager::on_update(tl_object_ptr<telegram_api::updateAttachMenuBots> update, Promise<Unit> &&promise) {
td_->attach_menu_manager_->reload_attach_menu_bots(std::move(promise));
}
@ -4456,8 +4461,4 @@ void UpdatesManager::on_update(tl_object_ptr<telegram_api::updateNewAuthorizatio
// unsupported updates
void UpdatesManager::on_update(tl_object_ptr<telegram_api::updateSavedReactionTags> update, Promise<Unit> &&promise) {
promise.set_value(Unit());
}
} // namespace td

View File

@ -475,6 +475,8 @@ class UpdatesManager final : public Actor {
void on_update(tl_object_ptr<telegram_api::updateRecentReactions> update, Promise<Unit> &&promise);
void on_update(tl_object_ptr<telegram_api::updateSavedReactionTags> update, Promise<Unit> &&promise);
void on_update(tl_object_ptr<telegram_api::updateAttachMenuBots> update, Promise<Unit> &&promise);
void on_update(tl_object_ptr<telegram_api::updateWebViewResultSent> update, Promise<Unit> &&promise);
@ -537,6 +539,10 @@ class UpdatesManager final : public Actor {
void on_update(tl_object_ptr<telegram_api::updatePinnedDialogs> update, Promise<Unit> &&promise);
void on_update(tl_object_ptr<telegram_api::updateDialogUnreadMark> update, Promise<Unit> &&promise);
void on_update(tl_object_ptr<telegram_api::updateSavedDialogPinned> update, Promise<Unit> &&promise);
void on_update(tl_object_ptr<telegram_api::updatePinnedSavedDialogs> update, Promise<Unit> &&promise);
void on_update(tl_object_ptr<telegram_api::updateDialogFilter> update, Promise<Unit> &&promise);
void on_update(tl_object_ptr<telegram_api::updateDialogFilters> update, Promise<Unit> &&promise);
void on_update(tl_object_ptr<telegram_api::updateDialogFilterOrder> update, Promise<Unit> &&promise);
@ -633,12 +639,6 @@ class UpdatesManager final : public Actor {
void on_update(tl_object_ptr<telegram_api::updateNewAuthorization> update, Promise<Unit> &&promise);
// unsupported updates
void on_update(tl_object_ptr<telegram_api::updateSavedDialogPinned> update, Promise<Unit> &&promise);
void on_update(tl_object_ptr<telegram_api::updatePinnedSavedDialogs> update, Promise<Unit> &&promise);
void on_update(tl_object_ptr<telegram_api::updateSavedReactionTags> update, Promise<Unit> &&promise);
};
} // namespace td