mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-26 04:58:49 +03:00
parent
75b112f0c8
commit
89e58f78f1
3 changed files with 11 additions and 11 deletions
|
@ -46,10 +46,10 @@ DeviceVerificationFlow::DeviceVerificationFlow(QObject *,
|
||||||
this->sas = olm::client()->sas_init();
|
this->sas = olm::client()->sas_init();
|
||||||
this->isMacVerified = false;
|
this->isMacVerified = false;
|
||||||
|
|
||||||
auto user_id = userID.toStdString();
|
auto user_id_ = userID.toStdString();
|
||||||
this->toClient = mtx::identifiers::parse<mtx::identifiers::User>(user_id);
|
this->toClient = mtx::identifiers::parse<mtx::identifiers::User>(user_id_);
|
||||||
cache::client()->query_keys(
|
cache::client()->query_keys(
|
||||||
user_id, [user_id, this](const UserKeyCache &res, mtx::http::RequestErr err) {
|
user_id_, [user_id_, this](const UserKeyCache &res, mtx::http::RequestErr err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
nhlog::net()->warn("failed to query device keys: {},{}",
|
nhlog::net()->warn("failed to query device keys: {},{}",
|
||||||
mtx::errors::to_string(err->matrix_error.errcode),
|
mtx::errors::to_string(err->matrix_error.errcode),
|
||||||
|
@ -59,7 +59,7 @@ DeviceVerificationFlow::DeviceVerificationFlow(QObject *,
|
||||||
|
|
||||||
if (!this->deviceId.isEmpty() &&
|
if (!this->deviceId.isEmpty() &&
|
||||||
(res.device_keys.find(deviceId.toStdString()) == res.device_keys.end())) {
|
(res.device_keys.find(deviceId.toStdString()) == res.device_keys.end())) {
|
||||||
nhlog::net()->warn("no devices retrieved {}", user_id);
|
nhlog::net()->warn("no devices retrieved {}", user_id_);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1617,8 +1617,8 @@ download_cross_signing_keys()
|
||||||
[secrets::cross_signing_user_signing] =
|
[secrets::cross_signing_user_signing] =
|
||||||
user_signing_key->encrypted.begin()->second;
|
user_signing_key->encrypted.begin()->second;
|
||||||
|
|
||||||
for (const auto &[key, secrets] : secrets)
|
for (const auto &[key, secret_] : secrets)
|
||||||
unlock_secrets(key, secrets);
|
unlock_secrets(key, secret_);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -171,13 +171,13 @@ SelfVerificationStatus::setupCrosssigning(bool useSSSS, QString password, bool u
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto &[user_id, tmp] : res.errors)
|
for (const auto &[user_id, tmp] : res.errors)
|
||||||
for (const auto &[key_id, e] : tmp)
|
for (const auto &[key_id, e_] : tmp)
|
||||||
nhlog::net()->error("signature error for user {} and key "
|
nhlog::net()->error("signature error for user {} and key "
|
||||||
"id {}: {}, {}",
|
"id {}: {}, {}",
|
||||||
user_id,
|
user_id,
|
||||||
key_id,
|
key_id,
|
||||||
mtx::errors::to_string(e.errcode),
|
mtx::errors::to_string(e_.errcode),
|
||||||
e.error);
|
e_.error);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -244,8 +244,8 @@ SelfVerificationStatus::verifyUnverifiedDevices()
|
||||||
return;
|
return;
|
||||||
|
|
||||||
std::vector<QString> devices;
|
std::vector<QString> devices;
|
||||||
for (const auto &[device, keys] : keys->device_keys) {
|
for (const auto &[device, keys_] : keys->device_keys) {
|
||||||
(void)keys;
|
(void)keys_;
|
||||||
if (!verif.verified_devices.count(device))
|
if (!verif.verified_devices.count(device))
|
||||||
devices.push_back(QString::fromStdString(device));
|
devices.push_back(QString::fromStdString(device));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue