From 75022464b33845d5d88b585eaba5a6595e600353 Mon Sep 17 00:00:00 2001 From: levlam Date: Mon, 19 Jul 2021 20:19:44 +0300 Subject: [PATCH] Add comment about random_length value. --- td/telegram/SecretChatActor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/td/telegram/SecretChatActor.cpp b/td/telegram/SecretChatActor.cpp index 2ee2daaed..b52ad7d41 100644 --- a/td/telegram/SecretChatActor.cpp +++ b/td/telegram/SecretChatActor.cpp @@ -1933,13 +1933,13 @@ void SecretChatActor::get_dh_config() { } auto version = auth_state_.dh_config.version; - int32 random_length = 0; + int32 random_length = 256; // ignored server-side, always returns 256 random bytes auto query = create_net_query(QueryType::DhConfig, telegram_api::messages_getDhConfig(version, random_length)); context_->send_net_query(std::move(query), actor_shared(this), false); } Status SecretChatActor::on_dh_config(NetQueryPtr query) { - LOG(INFO) << "Got dh config"; + LOG(INFO) << "Got DH config"; TRY_RESULT(config, fetch_result(std::move(query))); downcast_call(*config, [&](auto &obj) { this->on_dh_config(obj); }); TRY_STATUS(mtproto::DhHandshake::check_config(auth_state_.dh_config.g, auth_state_.dh_config.prime,