1 files changed, 9 insertions, 0 deletions
diff --git a/src/Olm.cpp b/src/Olm.cpp
index 5976c1c0..c426968f 100644
--- a/src/Olm.cpp
+++ b/src/Olm.cpp
@@ -5,6 +5,8 @@
using namespace mtx::crypto;
+static const std::string STORAGE_SECRET_KEY("secret");
+
namespace {
auto client_ = std::make_unique<mtx::crypto::OlmClient>();
}
@@ -229,4 +231,11 @@ create_inbound_megolm_session(const std::string &sender,
nhlog::crypto()->info("established inbound megolm session ({}, {})", room_id, sender);
}
+void
+mark_keys_as_published()
+{
+ olm::client()->mark_keys_as_published();
+ cache::client()->saveOlmAccount(olm::client()->save(STORAGE_SECRET_KEY));
+}
+
} // namespace olm
|