This commit is contained in:
Skye Jonke 2024-09-28 01:21:37 +00:00 committed by GitHub
commit fe68854dd1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -36,6 +36,7 @@
#include "UserSettingsPage.h"
#include "Utils.h"
#include "encryption/Olm.h"
#include <typeinfo>
//! Should be changed when a breaking change occurs in the cache format.
//! This will reset client's data.
@ -2290,7 +2291,13 @@ try {
}
auto j = nlohmann::json(event);
accountDataDb.put(txn, j["type"].get<std::string>(), j.dump());
try {
accountDataDb.put(txn, j["type"].get<std::string>(), j.dump());
} catch (const lmdb::error &e) {
nhlog::db()->warn("failed to save state after sync: {}, skipping event",
e.what());
return;
}
},
ev);
}