diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-12-27 15:42:11 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-12-27 15:42:11 +0900 |
commit | 00bd1be842f58b87633371a76587c103533baff5 (patch) | |
tree | 7323fef7a3d26d6be22e4473b3525812ac7b7459 /events | |
parent | e1be26ce46a60d26f6e936ca0443eac135b91cef (diff) | |
download | libquotient-00bd1be842f58b87633371a76587c103533baff5.tar.gz libquotient-00bd1be842f58b87633371a76587c103533baff5.zip |
StateEvent<>: Look for prev_content in unsigned, not top-level
Diffstat (limited to 'events')
-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> |