From 65877dc9fb6e024d456343d42ef55e0c5c8b67b3 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Mon, 24 May 2021 16:52:45 +0200 Subject: Upload one-time keys when their count is low --- lib/crypto/qolmaccount.cpp | 5 +++++ lib/crypto/qolmaccount.h | 2 ++ 2 files changed, 7 insertions(+) (limited to 'lib/crypto') diff --git a/lib/crypto/qolmaccount.cpp b/lib/crypto/qolmaccount.cpp index 9368de4f..8cf21045 100644 --- a/lib/crypto/qolmaccount.cpp +++ b/lib/crypto/qolmaccount.cpp @@ -276,6 +276,11 @@ std::variant, QOlmError> QOlmAccount::createOutboun return QOlmSession::createOutboundSession(this, theirIdentityKey, theirOneTimeKey); } +void QOlmAccount::markKeysAsPublished() +{ + olm_account_mark_keys_as_published(m_account); +} + bool Quotient::verifyIdentitySignature(const DeviceKeys &deviceKeys, const QString &deviceId, const QString &userId) diff --git a/lib/crypto/qolmaccount.h b/lib/crypto/qolmaccount.h index f3ca82f0..54d8506c 100644 --- a/lib/crypto/qolmaccount.h +++ b/lib/crypto/qolmaccount.h @@ -93,6 +93,8 @@ public: /// identity and one time key. std::variant, QOlmError> createOutboundSession(const QByteArray &theirIdentityKey, const QByteArray &theirOneTimeKey); + void markKeysAsPublished(); + // HACK do not use directly QOlmAccount(OlmAccount *account); OlmAccount *data(); -- cgit v1.2.3