diff --git a/test/online.cpp b/test/online.cpp index 65114c6db658..4a2a4049641b 100644 --- a/test/online.cpp +++ b/test/online.cpp @@ -224,7 +224,9 @@ class InitTask : public Task { void start_up() override { send_query(td::make_tl_object("version"), - [](auto res) { LOG(INFO) << td::td_api::to_string(res.ok()); }); + [](td::Result> res) { + LOG(INFO) << td::td_api::to_string(res.ok()); + }); } void process_authorization_state(td::tl_object_ptr authorization_state) { td::tl_object_ptr function; @@ -283,7 +285,9 @@ class GetMe : public Task { explicit GetMe(Promise promise) : promise_(std::move(promise)) { } void start_up() override { - send_query(td::make_tl_object(), [this](auto res) { with_user_id(res.move_as_ok()->id_); }); + send_query( + td::make_tl_object(), + [this](td::Result> res) { with_user_id(res.move_as_ok()->id_); }); } private: @@ -292,8 +296,9 @@ class GetMe : public Task { void with_user_id(int64 user_id) { result_.user_id = user_id; - send_query(td::make_tl_object(user_id, false), - [this](auto res) { with_chat_id(res.move_as_ok()->id_); }); + send_query( + td::make_tl_object(user_id, false), + [this](td::Result> res) { with_chat_id(res.move_as_ok()->id_); }); } void with_chat_id(int64 chat_id) { @@ -336,7 +341,7 @@ class UploadFile : public Task { td::make_tl_object( td::make_tl_object(content_path_), nullptr, true, td::make_tl_object("tag", td::Auto()))), - [this](auto res) { with_message(res.move_as_ok()); }); + [this](td::Result> res) { with_message(res.move_as_ok()); }); } private: @@ -392,7 +397,7 @@ class TestDownloadFile : public Task { } void start_up() override { send_query(td::make_tl_object(remote_id_, nullptr), - [this](auto res) { start_file(*res.ok()); }); + [this](td::Result> res) { start_file(*res.ok()); }); } private: @@ -454,7 +459,7 @@ class TestDownloadFile : public Task { send_query(td::make_tl_object( file_id_, 1, static_cast(ranges_.back().begin), static_cast(ranges_.back().end - ranges_.back().begin), true), - [this](auto res) { on_get_chunk(*res.ok()); }); + [this](td::Result> res) { on_get_chunk(*res.ok()); }); } };