diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-07-12 14:56:20 +0200 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-07-12 14:56:20 +0200 |
commit | 73167a23212541ff6aeaeb901d7dfe636badc6e8 (patch) | |
tree | f889b50746fd393d005552cd6c3580449fc78166 /lib/events/roomevent.cpp | |
parent | 607489a2e6a3e3238eac0178f5c7bbc70f178f46 (diff) | |
parent | e7dee15531ad357bd33ac546fb1b9332a5c1260c (diff) | |
download | libquotient-73167a23212541ff6aeaeb901d7dfe636badc6e8.tar.gz libquotient-73167a23212541ff6aeaeb901d7dfe636badc6e8.zip |
Merge branch 'kitsune/converters-upgrade' into dev
Diffstat (limited to 'lib/events/roomevent.cpp')
-rw-r--r-- | lib/events/roomevent.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/events/roomevent.cpp b/lib/events/roomevent.cpp index 3ddf5ac4..e695e0ec 100644 --- a/lib/events/roomevent.cpp +++ b/lib/events/roomevent.cpp @@ -15,9 +15,9 @@ RoomEvent::RoomEvent(Type type, event_mtype_t matrixType, RoomEvent::RoomEvent(Type type, const QJsonObject& json) : Event(type, json) { - if (const auto redaction = unsignedPart(RedactedCauseKeyL); - redaction.isObject()) - _redactedBecause = makeEvent<RedactionEvent>(redaction.toObject()); + if (const auto redaction = unsignedPart<QJsonObject>(RedactedCauseKeyL); + !redaction.isEmpty()) + _redactedBecause = makeEvent<RedactionEvent>(redaction); } RoomEvent::~RoomEvent() = default; // Let the smart pointer do its job |