aboutsummaryrefslogtreecommitdiff
path: root/events/event.h
diff options
context:
space:
mode:
Diffstat (limited to 'events/event.h')
-rw-r--r--events/event.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/events/event.h b/events/event.h
index 9c915e35..c0c1b603 100644
--- a/events/event.h
+++ b/events/event.h
@@ -159,7 +159,8 @@ namespace QMatrixClient
template <typename... ContentParamTs>
explicit StateEvent(Type type, const QJsonObject& obj,
ContentParamTs&&... contentParams)
- : RoomEvent(type, obj)
+ : RoomEvent(obj.contains("state_key") ? type : Type::Unknown,
+ obj)
, _content(contentJson(),
std::forward<ContentParamTs>(contentParams)...)
{