Store megolm session data in separate database

This commit is contained in:
Nicolas Werner 2021-07-17 01:27:37 +02:00
parent 0b864d9485
commit 9fadd14871
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
7 changed files with 210 additions and 86 deletions

View file

@ -939,12 +939,16 @@ ChatPage::ensureOneTimeKeyCount(const std::map<std::string, uint16_t> &counts)
[](const mtx::responses::UploadKeys &, mtx::http::RequestErr err) {
if (err) {
nhlog::crypto()->warn(
"failed to update one-time keys: {} {}",
"failed to update one-time keys: {} {} {}",
err->matrix_error.error,
static_cast<int>(err->status_code));
return;
static_cast<int>(err->status_code),
static_cast<int>(err->error_code));
if (err->status_code < 400 || err->status_code >= 500)
return;
}
// mark as published anyway, otherwise we may end up in a loop.
olm::mark_keys_as_published();
});
}