aboutsummaryrefslogtreecommitdiff
path: root/lib/events/stateevent.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/events/stateevent.h')
-rw-r--r--lib/events/stateevent.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/events/stateevent.h b/lib/events/stateevent.h
index 5dadac7f..692f2685 100644
--- a/lib/events/stateevent.h
+++ b/lib/events/stateevent.h
@@ -37,7 +37,12 @@ namespace QMatrixClient {
public:
using factory_t = EventFactory<StateEventBase>;
- using RoomEvent::RoomEvent;
+ StateEventBase(Type type, const QJsonObject& json)
+ : RoomEvent(type, json)
+ { }
+ StateEventBase(Type type, event_mtype_t matrixType,
+ const QString& stateKey = {},
+ const QJsonObject& contentJson = {});
~StateEventBase() override = default;
bool isStateEvent() const override { return true; }
@@ -94,8 +99,9 @@ namespace QMatrixClient {
}
template <typename... ContentParamTs>
explicit StateEvent(Type type, event_mtype_t matrixType,
+ const QString& stateKey = {},
ContentParamTs&&... contentParams)
- : StateEventBase(type, matrixType)
+ : StateEventBase(type, matrixType, stateKey)
, _content(std::forward<ContentParamTs>(contentParams)...)
{
editJson().insert(ContentKey, _content.toJson());