2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Update tgcalls to use new protocol.

This commit is contained in:
John Preston
2020-07-21 21:20:36 +04:00
parent f3808bdc24
commit c1f727bde9
3 changed files with 10 additions and 9 deletions

View File

@@ -643,18 +643,15 @@ void Call::startConfirmedCall(const MTPDphoneCall &call) {
void Call::createAndStartController(const MTPDphoneCall &call) {
_discardByTimeoutTimer.cancel();
if (!checkCallFields(call)) {
if (!checkCallFields(call) || _authKey.size() != 256) {
return;
}
const auto &protocol = call.vprotocol().c_phoneCallProtocol();
const auto &serverConfig = _user->session().serverConfig();
auto encryptionKeyValue = ranges::view::all(
_authKey
) | ranges::view::transform([](bytes::type byte) {
return static_cast<uint8_t>(byte);
}) | ranges::to_vector;
auto encryptionKeyValue = std::make_shared<std::array<uint8_t, 256>>();
memcpy(encryptionKeyValue->data(), _authKey.data(), 256);
const auto weak = base::make_weak(this);
auto descriptor = tgcalls::Descriptor{