From afbadb9741cfd074a0f402c2e56bacad4a7cf687 Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 3 Dec 2019 01:14:01 +0300 Subject: [PATCH] Add unix_time read-only option. GitOrigin-RevId: bf3c1248f14e216197e50d819d35609824260940 --- td/telegram/Td.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/td/telegram/Td.cpp b/td/telegram/Td.cpp index 3cc9166be..0dc5ac031 100644 --- a/td/telegram/Td.cpp +++ b/td/telegram/Td.cpp @@ -6862,6 +6862,11 @@ void Td::on_request(uint64 id, td_api::getOption &request) { option_value = make_tl_object(is_online_); } break; + case 'u': + if (request.name_ == "unix_time") { + option_value = make_tl_object(G()->unix_time()); + } + break; case 'v': if (request.name_ == "version") { option_value = make_tl_object(TDLIB_VERSION);