aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/QXmppAtmManager.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/client/QXmppAtmManager.cpp b/src/client/QXmppAtmManager.cpp
index e0255a9e..1be9052f 100644
--- a/src/client/QXmppAtmManager.cpp
+++ b/src/client/QXmppAtmManager.cpp
@@ -409,20 +409,22 @@ QFuture<void> QXmppAtmManager::authenticate(const QString &encryption, const QMu
} else {
auto future = m_trustStorage->setTrustLevel(encryption, keyIds, QXmppTrustStorage::Authenticated);
await(future, this, [=]() {
- if (m_trustStorage->securityPolicy(encryption) == QXmppTrustStorage::Toakafa) {
- auto future = distrustAutomaticallyTrustedKeys(encryption, keyIds.uniqueKeys());
- await(future, this, [=]() {
+ await(m_trustStorage->securityPolicy(encryption), this, [=](const auto securityPolicy) {
+ if (securityPolicy == QXmppTrustStorage::Toakafa) {
+ auto future = distrustAutomaticallyTrustedKeys(encryption, keyIds.uniqueKeys());
+ await(future, this, [=]() {
+ auto future = makePostponedTrustDecisions(encryption, keyIds.values());
+ await(future, this, [=]() {
+ interface->reportFinished();
+ });
+ });
+ } else {
auto future = makePostponedTrustDecisions(encryption, keyIds.values());
await(future, this, [=]() {
interface->reportFinished();
});
- });
- } else {
- auto future = makePostponedTrustDecisions(encryption, keyIds.values());
- await(future, this, [=]() {
- interface->reportFinished();
- });
- }
+ }
+ });
});
}