Merge remote-tracking branch 'nheko-im/master' into video_player_enhancements

This commit is contained in:
Joseph Donofry 2021-11-09 18:34:40 -05:00
commit c68c8de74f
No known key found for this signature in database
GPG key ID: E8A1D78EF044B0CB
6 changed files with 191 additions and 7 deletions

View file

@ -29,6 +29,7 @@
#include "CacheCryptoStructs.h"
#include "CacheStructs.h"
#include "Logging.h"
class Cache : public QObject
{
@ -518,8 +519,12 @@ private:
while (cursor.get(typeStrV, data, first ? MDB_FIRST_DUP : MDB_NEXT_DUP)) {
first = false;
if (eventsDb.get(txn, json::parse(data)["id"].get<std::string>(), value))
events.push_back(json::parse(value).get<mtx::events::StateEvent<T>>());
try {
if (eventsDb.get(txn, json::parse(data)["id"].get<std::string>(), value))
events.push_back(json::parse(value).get<mtx::events::StateEvent<T>>());
} catch (std::exception &e) {
nhlog::db()->warn("Failed to parse state event: {}", e.what());
}
}
}
}