diff options
-rw-r--r-- | events/event.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/events/event.h b/events/event.h index d4923f1f..00dc4d5c 100644 --- a/events/event.h +++ b/events/event.h @@ -254,9 +254,10 @@ namespace QMatrixClient , _content(contentJson(), std::forward<ContentParamTs>(contentParams)...) { - if (obj.contains("prev_content")) + auto unsignedData = obj.value("unsigned").toObject(); + if (unsignedData.contains("prev_content")) _prev.reset(new ContentT( - obj["prev_content"].toObject(), + unsignedData.value("prev_content").toObject(), std::forward<ContentParamTs>(contentParams)...)); } template <typename... ContentParamTs> |