diff options
Diffstat (limited to 'lib/events')
-rw-r--r-- | lib/events/roommemberevent.h | 7 | ||||
-rw-r--r-- | lib/events/stateevent.h | 2 |
2 files changed, 3 insertions, 6 deletions
diff --git a/lib/events/roommemberevent.h b/lib/events/roommemberevent.h index db25d026..149d74f8 100644 --- a/lib/events/roommemberevent.h +++ b/lib/events/roommemberevent.h @@ -29,13 +29,10 @@ namespace QMatrixClient enum MembershipType : size_t { Invite = 0, Join, Knock, Leave, Ban, Undefined }; - explicit MemberEventContent(MembershipType mt = MembershipType::Join) + explicit MemberEventContent(MembershipType mt = Join) : membership(mt) { } explicit MemberEventContent(const QJsonObject& json); - explicit MemberEventContent(const QJsonValue& jv) - : MemberEventContent(jv.toObject()) - { } MembershipType membership; bool isDirect = false; @@ -60,7 +57,7 @@ namespace QMatrixClient : StateEvent(typeId(), obj) { } RoomMemberEvent(MemberEventContent&& c) - : StateEvent(typeId(), matrixTypeId(), c.toJson()) + : StateEvent(typeId(), matrixTypeId(), c) { } // This is a special constructor enabling RoomMemberEvent to be diff --git a/lib/events/stateevent.h b/lib/events/stateevent.h index d4a7e8b3..d82de7e1 100644 --- a/lib/events/stateevent.h +++ b/lib/events/stateevent.h @@ -95,7 +95,7 @@ namespace QMatrixClient { QString prevSenderId() const { return _prev ? _prev->senderId : QString(); } - protected: + private: ContentT _content; std::unique_ptr<Prev<ContentT>> _prev; }; |