summary refs log tree commit diff
path: root/src/ChatPage.cc
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-06-18 12:56:47 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-06-18 12:56:47 +0300
commit604cdcec8abf8a8c564111d6f55feaf94486ba6c (patch)
tree89501231f6f57e6ba9a7a3a8bf63ab025a325c8e /src/ChatPage.cc
parentImprove logging a bit (diff)
downloadnheko-604cdcec8abf8a8c564111d6f55feaf94486ba6c.tar.xz
Save the olm account after we create new one-time keys
Otherwise after a restart the old account will be loaded and we
won't be able to decrypt messages from devices using the new one-time keys.

Also new one-time key upload requests will fail due to conflicts with
the existing keys with the same keyid.
Diffstat (limited to 'src/ChatPage.cc')
-rw-r--r--src/ChatPage.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ChatPage.cc b/src/ChatPage.cc

index e543cdf9..cc9473e6 100644 --- a/src/ChatPage.cc +++ b/src/ChatPage.cc
@@ -1038,7 +1038,8 @@ ChatPage::tryInitialSync() return; } - olm::client()->mark_keys_as_published(); + olm::mark_keys_as_published(); + for (const auto &entry : res.one_time_key_counts) nhlog::net()->info( "uploaded {} {} one-time keys", entry.second, entry.first); @@ -1273,7 +1274,7 @@ ChatPage::ensureOneTimeKeyCount(const std::map<std::string, uint16_t> &counts) return; } - olm::client()->mark_keys_as_published(); + olm::mark_keys_as_published(); }); } }