summary refs log tree commit diff
path: root/src/ChatPage.cpp
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2021-07-18 16:22:45 +0000
committerGitHub <noreply@github.com>2021-07-18 16:22:45 +0000
commit1dc20f9164a9e4b733c1b076473a0ebb01ba87b4 (patch)
treeba6c1fa565a855f746db0ffbfcd1f1331aa1950a /src/ChatPage.cpp
parentFix replies not reloading after fetching them (diff)
parentDisable unchecked key sharing to trusted users by default (diff)
downloadnheko-1dc20f9164a9e4b733c1b076473a0ebb01ba87b4.tar.xz
Merge pull request #646 from Nheko-Reborn/historical-key-sharing
Historical key sharing
Diffstat (limited to 'src/ChatPage.cpp')
-rw-r--r--src/ChatPage.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/ChatPage.cpp b/src/ChatPage.cpp

index 6003eb85..10a91557 100644 --- a/src/ChatPage.cpp +++ b/src/ChatPage.cpp
@@ -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(); }); }