Skip to content

Commit

Permalink
Support telegram_api::updateAutoSaveSettings.
Browse files Browse the repository at this point in the history
  • Loading branch information
levlam committed Feb 3, 2023
1 parent 39f4091 commit 7556ef4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion td/telegram/AutosaveManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,9 @@ void AutosaveManager::on_get_autosave_settings(

auto promises = std::move(load_settings_queries_);
for (auto &promise : promises) {
promise.set_value(settings_.get_autosave_settings_object());
if (promise) {
promise.set_value(settings_.get_autosave_settings_object());
}
}
}

Expand Down
6 changes: 4 additions & 2 deletions td/telegram/UpdatesManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "td/telegram/AnimationsManager.h"
#include "td/telegram/AttachMenuManager.h"
#include "td/telegram/AuthManager.h"
#include "td/telegram/AutosaveManager.h"
#include "td/telegram/CallbackQueriesManager.h"
#include "td/telegram/CallManager.h"
#include "td/telegram/ChannelId.h"
Expand Down Expand Up @@ -3915,10 +3916,11 @@ void UpdatesManager::on_update(tl_object_ptr<telegram_api::updateTranscribedAudi
promise.set_value(Unit());
}

// unsupported updates

void UpdatesManager::on_update(tl_object_ptr<telegram_api::updateAutoSaveSettings> update, Promise<Unit> &&promise) {
td_->autosave_manager_->reload_autosave_settings(Auto());
promise.set_value(Unit());
}

// unsupported updates

} // namespace td
4 changes: 2 additions & 2 deletions td/telegram/UpdatesManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -584,9 +584,9 @@ class UpdatesManager final : public Actor {

void on_update(tl_object_ptr<telegram_api::updateTranscribedAudio> update, Promise<Unit> &&promise);

// unsupported updates

void on_update(tl_object_ptr<telegram_api::updateAutoSaveSettings> update, Promise<Unit> &&promise);

// unsupported updates
};

} // namespace td

0 comments on commit 7556ef4

Please sign in to comment.