aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/online.cpp
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2023-01-12 22:25:47 +0300
committerlevlam <levlam@telegram.org>2023-01-12 22:25:47 +0300
commit75bdc6292b488c195645a01b9242c7dab9d01fd1 (patch)
treebfb5e856045285db7743b08d1636e5ff52b182fb /test/online.cpp
parente87e18c8be3f11439f91d163a8fb30cea1e3e75f (diff)
Remove some getAuthorizationState usages.
Diffstat (limited to 'test/online.cpp')
-rw-r--r--test/online.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/test/online.cpp b/test/online.cpp
index 1ffc5523f..fd758129d 100644
--- a/test/online.cpp
+++ b/test/online.cpp
@@ -221,14 +221,12 @@ class InitTask : public Task {
private:
Options options_;
td::Promise<> promise_;
- bool start_flag_{false};
void start_up() override {
- send_query(td::make_tl_object<td::td_api::getAuthorizationState>(),
- [this](auto res) { this->process_authorization_state(res.move_as_ok()); });
+ send_query(td::make_tl_object<td::td_api::getOption>("version"),
+ [](auto res) { LOG(INFO) << td::td_api::to_string(res.ok()); });
}
void process_authorization_state(td::tl_object_ptr<td::td_api::Object> authorization_state) {
- start_flag_ = true;
td::tl_object_ptr<td::td_api::Function> function;
switch (authorization_state->get_id()) {
case td::td_api::authorizationStateReady::ID:
@@ -267,9 +265,6 @@ class InitTask : public Task {
});
}
void process_update(std::shared_ptr<TestClient::Update> update) override {
- if (!start_flag_) {
- return;
- }
if (!update->object) {
return;
}