Add temp fix to work with servers that don't support e2ee endpoints

fixes #371
This commit is contained in:
Konstantinos Sideris 2018-08-30 20:37:24 +03:00
parent ee2ba93ec4
commit b10e1bafc8

View file

@ -978,6 +978,12 @@ ChatPage::tryInitialSync()
nhlog::crypto()->critical("failed to upload one time keys: {} {}",
err->matrix_error.error,
status_code);
if (status_code == 404) {
nhlog::net()->warn(
"skipping key uploading. server doesn't provide /keys/upload");
return startInitialSync();
}
// TODO We should have a timeout instead of keeping hammering the server.
emit tryInitialSyncCb();
return;