aboutsummaryrefslogtreecommitdiff
path: root/lib/connection.cpp
diff options
context:
space:
mode:
authorTobias Fella <fella@posteo.de>2021-05-24 01:51:15 +0200
committerTobias Fella <fella@posteo.de>2021-12-01 21:36:58 +0100
commit1d851e7b2e5e0c937413b8fd4bcdb35c8492430b (patch)
tree993c06a4203bd6956745a926d397e8f0fd061de9 /lib/connection.cpp
parent211d0c1b96c13f949f50799f5a4412ae31586546 (diff)
downloadlibquotient-1d851e7b2e5e0c937413b8fd4bcdb35c8492430b.tar.gz
libquotient-1d851e7b2e5e0c937413b8fd4bcdb35c8492430b.zip
Upload device keys when creating a new olm account
Diffstat (limited to 'lib/connection.cpp')
-rw-r--r--lib/connection.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp
index 0c0bada6..1485a347 100644
--- a/lib/connection.cpp
+++ b/lib/connection.cpp
@@ -455,6 +455,10 @@ void Connection::Private::completeSetup(const QString& mxId)
olmAccount->createNewAccount();
accountSettings.setEncryptionAccountPickle(std::get<QByteArray>(olmAccount->pickle(Unencrypted{})));
// TODO handle pickle errors
+ auto job = q->callApi<UploadKeysJob>(olmAccount->deviceKeys());
+ connect(job, &BaseJob::failure, q, [=]{
+ qCWarning(E2EE) << "Failed to upload device keys:" << job->errorString();
+ });
} else {
// account already existing
auto pickle = accountSettings.encryptionAccountPickle();