diff --git a/td/mtproto/Handshake.h b/td/mtproto/Handshake.h index 952c4ef80..46f0c69c8 100644 --- a/td/mtproto/Handshake.h +++ b/td/mtproto/Handshake.h @@ -79,6 +79,10 @@ class AuthKeyHandshake { void clear(); + const AuthKey &get_auth_key() const { + return auth_key_; + } + AuthKey release_auth_key() { return std::move(auth_key_); } diff --git a/test/mtproto.cpp b/test/mtproto.cpp index 3a49b2d8f..97a708002 100644 --- a/test/mtproto.cpp +++ b/test/mtproto.cpp @@ -564,7 +564,7 @@ class FastPingTestActor : public Actor { unique_ptr auth_data; if (iteration_ % 2 == 0) { auth_data = make_unique(); - auth_data->set_tmp_auth_key(handshake_->release_auth_key()); + auth_data->set_tmp_auth_key(handshake_->get_auth_key()); auth_data->set_server_time_difference(handshake_->get_server_time_diff()); auth_data->set_server_salt(handshake_->get_server_salt(), Time::now()); auth_data->set_future_salts({mtproto::ServerSalt{0u, 1e20, 1e30}}, Time::now());