diff options
Diffstat (limited to 'lib/events/roommemberevent.h')
-rw-r--r-- | lib/events/roommemberevent.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/events/roommemberevent.h b/lib/events/roommemberevent.h index 89b970c9..8e0cc0a4 100644 --- a/lib/events/roommemberevent.h +++ b/lib/events/roommemberevent.h @@ -52,16 +52,18 @@ namespace QMatrixClient { Q_GADGET public: - static constexpr const char* TypeId = "m.room.member"; + static constexpr const char* typeId() { return "m.room.member"; } using MembershipType = MemberEventContent::MembershipType; + explicit RoomMemberEvent(Type type, const QJsonObject& obj) + : StateEvent(type, obj) + { } RoomMemberEvent(MemberEventContent&& c) : StateEvent(Type::RoomMember, c) { } explicit RoomMemberEvent(const QJsonObject& obj) - : StateEvent(Type::RoomMember, obj) -// , _userId(obj["state_key"].toString()) + : RoomMemberEvent(Type::RoomMember, obj) { } MembershipType membership() const { return content().membership; } @@ -72,7 +74,6 @@ namespace QMatrixClient QUrl avatarUrl() const { return content().avatarUrl; } private: -// QString _userId; REGISTER_ENUM(MembershipType) }; } // namespace QMatrixClient |