diff options
Diffstat (limited to 'lib/events/stateevent.cpp')
-rw-r--r-- | lib/events/stateevent.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/events/stateevent.cpp b/lib/events/stateevent.cpp index f172edb6..7fea59a1 100644 --- a/lib/events/stateevent.cpp +++ b/lib/events/stateevent.cpp @@ -24,10 +24,9 @@ using namespace QMatrixClient; // StateEventBase itself can be instantiated if there's a state_key JSON key // but the event type is unknown. [[gnu::unused]] static auto stateEventTypeInitialised = - RoomEvent::factory_t::addMethod([](const QJsonObject& json, - const QString& matrixType) - -> StateEventPtr { - if (!json.contains("state_key")) + RoomEvent::factory_t::addMethod( + [](const QJsonObject& json, const QString& matrixType) -> StateEventPtr { + if (!json.contains("state_key"_ls)) return nullptr; if (auto e = StateEventBase::factory_t::make(json, matrixType)) @@ -53,7 +52,7 @@ void StateEventBase::dumpTo(QDebug dbg) const dbg << '<' << stateKey() << "> "; if (unsignedJson().contains(PrevContentKeyL)) dbg << QJsonDocument(unsignedJson()[PrevContentKeyL].toObject()) - .toJson(QJsonDocument::Compact) + .toJson(QJsonDocument::Compact) << " -> "; RoomEvent::dumpTo(dbg); } |