From 00bd1be842f58b87633371a76587c103533baff5 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Wed, 27 Dec 2017 15:42:11 +0900 Subject: StateEvent<>: Look for prev_content in unsigned, not top-level --- events/event.h | 5 +++-- 1 file 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(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(contentParams)...)); } template -- cgit v1.2.3