mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 04:28:49 +03:00
Skip migration if sender_key is not a string or present
This commit is contained in:
parent
b0e3c6d65a
commit
b57152a1c9
1 changed files with 3 additions and 1 deletions
|
@ -1327,6 +1327,8 @@ Cache::runMigrations()
|
|||
std::map<std::string, std::string> megolmSessionData;
|
||||
while (cursor.get(key, value, MDB_NEXT)) {
|
||||
auto indexVal = nlohmann::json::parse(key);
|
||||
if (!indexVal.contains("sender_key") || !indexVal.at("sender_key").is_string())
|
||||
continue;
|
||||
auto sender_key = indexVal["sender_key"].get<std::string>();
|
||||
indexVal.erase("sender_key");
|
||||
|
||||
|
|
Loading…
Reference in a new issue