mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Fix parsing some exotic image packs
This commit is contained in:
parent
add5dfce7f
commit
d11fcb0ff6
3 changed files with 9 additions and 4 deletions
|
@ -388,7 +388,7 @@ if(USE_BUNDLED_MTXCLIENT)
|
|||
FetchContent_Declare(
|
||||
MatrixClient
|
||||
GIT_REPOSITORY https://github.com/Nheko-Reborn/mtxclient.git
|
||||
GIT_TAG fc5d01c775bde656b6d69954189522d138efe022
|
||||
GIT_TAG bacb7e524ff0f38591b88b248d8d8409b7fd49a0
|
||||
)
|
||||
set(BUILD_LIB_EXAMPLES OFF CACHE INTERNAL "")
|
||||
set(BUILD_LIB_TESTS OFF CACHE INTERNAL "")
|
||||
|
|
|
@ -163,7 +163,7 @@ modules:
|
|||
buildsystem: cmake-ninja
|
||||
name: mtxclient
|
||||
sources:
|
||||
- commit: fc5d01c775bde656b6d69954189522d138efe022
|
||||
- commit: bacb7e524ff0f38591b88b248d8d8409b7fd49a0
|
||||
type: git
|
||||
url: https://github.com/Nheko-Reborn/mtxclient.git
|
||||
- config-opts:
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue