@@ -224,7 +224,9 @@ class InitTask : public Task {
224
224
225
225
void start_up () override {
226
226
send_query (td::make_tl_object<td::td_api::getOption>(" version" ),
227
- [](auto res) { LOG (INFO) << td::td_api::to_string (res.ok ()); });
227
+ [](td::Result<td::td_api::object_ptr<td::td_api::OptionValue>> res) {
228
+ LOG (INFO) << td::td_api::to_string (res.ok ());
229
+ });
228
230
}
229
231
void process_authorization_state (td::tl_object_ptr<td::td_api::Object> authorization_state) {
230
232
td::tl_object_ptr<td::td_api::Function> function;
@@ -283,7 +285,9 @@ class GetMe : public Task {
283
285
explicit GetMe (Promise<Result> promise) : promise_(std::move(promise)) {
284
286
}
285
287
void start_up () override {
286
- send_query (td::make_tl_object<td::td_api::getMe>(), [this ](auto res) { with_user_id (res.move_as_ok ()->id_ ); });
288
+ send_query (
289
+ td::make_tl_object<td::td_api::getMe>(),
290
+ [this ](td::Result<td::td_api::object_ptr<td::td_api::user>> res) { with_user_id (res.move_as_ok ()->id_ ); });
287
291
}
288
292
289
293
private:
@@ -292,8 +296,9 @@ class GetMe : public Task {
292
296
293
297
void with_user_id (int64 user_id) {
294
298
result_.user_id = user_id;
295
- send_query (td::make_tl_object<td::td_api::createPrivateChat>(user_id, false ),
296
- [this ](auto res) { with_chat_id (res.move_as_ok ()->id_ ); });
299
+ send_query (
300
+ td::make_tl_object<td::td_api::createPrivateChat>(user_id, false ),
301
+ [this ](td::Result<td::td_api::object_ptr<td::td_api::chat>> res) { with_chat_id (res.move_as_ok ()->id_ ); });
297
302
}
298
303
299
304
void with_chat_id (int64 chat_id) {
@@ -336,7 +341,7 @@ class UploadFile : public Task {
336
341
td::make_tl_object<td::td_api::inputMessageDocument>(
337
342
td::make_tl_object<td::td_api::inputFileLocal>(content_path_), nullptr , true ,
338
343
td::make_tl_object<td::td_api::formattedText>(" tag" , td::Auto ()))),
339
- [this ](auto res) { with_message (res.move_as_ok ()); });
344
+ [this ](td::Result<td::td_api::object_ptr<td::td_api::message>> res) { with_message (res.move_as_ok ()); });
340
345
}
341
346
342
347
private:
@@ -392,7 +397,7 @@ class TestDownloadFile : public Task {
392
397
}
393
398
void start_up () override {
394
399
send_query (td::make_tl_object<td::td_api::getRemoteFile>(remote_id_, nullptr ),
395
- [this ](auto res) { start_file (*res.ok ()); });
400
+ [this ](td::Result<td::td_api::object_ptr<td::td_api::file>> res) { start_file (*res.ok ()); });
396
401
}
397
402
398
403
private:
@@ -454,7 +459,7 @@ class TestDownloadFile : public Task {
454
459
send_query (td::make_tl_object<td::td_api::downloadFile>(
455
460
file_id_, 1 , static_cast <int64>(ranges_.back ().begin ),
456
461
static_cast <int64>(ranges_.back ().end - ranges_.back ().begin ), true ),
457
- [this ](auto res) { on_get_chunk (*res.ok ()); });
462
+ [this ](td::Result<td::td_api::object_ptr<td::td_api::file>> res) { on_get_chunk (*res.ok ()); });
458
463
}
459
464
};
460
465
0 commit comments