aboutsummaryrefslogtreecommitdiff
path: root/lib/events/roompowerlevelsevent.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/events/roompowerlevelsevent.h')
-rw-r--r--lib/events/roompowerlevelsevent.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/events/roompowerlevelsevent.h b/lib/events/roompowerlevelsevent.h
index a1638a27..6150980a 100644
--- a/lib/events/roompowerlevelsevent.h
+++ b/lib/events/roompowerlevelsevent.h
@@ -31,16 +31,11 @@ struct QUOTIENT_API PowerLevelsEventContent {
};
class QUOTIENT_API RoomPowerLevelsEvent
- : public StateEvent<PowerLevelsEventContent> {
+ : public KeylessStateEventBase<RoomPowerLevelsEvent, PowerLevelsEventContent> {
public:
- DEFINE_EVENT_TYPEID("m.room.power_levels", RoomPowerLevelsEvent)
+ QUO_EVENT(RoomPowerLevelsEvent, "m.room.power_levels")
- explicit RoomPowerLevelsEvent(PowerLevelsEventContent&& content)
- : StateEvent(typeId(), matrixTypeId(), QString(), std::move(content))
- {}
- explicit RoomPowerLevelsEvent(const QJsonObject& obj)
- : StateEvent(typeId(), obj)
- {}
+ using KeylessStateEventBase::KeylessStateEventBase;
int invite() const { return content().invite; }
int kick() const { return content().kick; }
@@ -61,5 +56,4 @@ public:
int powerLevelForState(const QString& eventId) const;
int powerLevelForUser(const QString& userId) const;
};
-REGISTER_EVENT_TYPE(RoomPowerLevelsEvent)
} // namespace Quotient