Commit 98870fa0 authored by nannanko Suki's avatar nannanko Suki
Browse files

Fix crash that nlohmann cant found key "algorithm"

parent 57be58ed
Pipeline #1229 failed with stages
in 5 seconds
......@@ -386,7 +386,7 @@ namespace Kazv
MaybeString Crypto::decrypt(nlohmann::json eventJson)
auto content ="content");
auto algo ="algorithm").get<std::string>();
auto algo = content.contains("algorithm") ?"algorithm").template get<std::string>() : std::string();
if (algo == olmAlgo) {
return m_d->decryptOlm(std::move(content));
} else if (algo == megOlmAlgo) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment