diff --git a/td/mtproto/Transport.cpp b/td/mtproto/Transport.cpp index cafaa08e2..05d2f4bc3 100644 --- a/td/mtproto/Transport.cpp +++ b/td/mtproto/Transport.cpp @@ -309,8 +309,7 @@ Result Transport::read(MutableSlice message, const AuthKe MutableSlice data; if (info->type == PacketInfo::EndToEnd) { TRY_STATUS(read_e2e_crypto(message, auth_key, info, &data)); - } - if (info->no_crypto_flag) { + } else if (info->no_crypto_flag) { TRY_STATUS(read_no_crypto(message, info, &data)); } else { if (auth_key.empty()) {