aboutsummaryrefslogtreecommitdiff
path: root/lib/events/reactionevent.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/events/reactionevent.h')
-rw-r--r--lib/events/reactionevent.h17
1 files changed, 2 insertions, 15 deletions
diff --git a/lib/events/reactionevent.h b/lib/events/reactionevent.h
index b3cb3ca7..8d873441 100644
--- a/lib/events/reactionevent.h
+++ b/lib/events/reactionevent.h
@@ -8,20 +8,7 @@
namespace Quotient {
-class QUOTIENT_API ReactionEvent : public RoomEvent {
-public:
- DEFINE_EVENT_TYPEID("m.reaction", ReactionEvent)
-
- explicit ReactionEvent(const EventRelation& value)
- : RoomEvent(typeId(), matrixTypeId(),
- { { QStringLiteral("m.relates_to"), toJson(value) } })
- {}
- explicit ReactionEvent(const QJsonObject& obj) : RoomEvent(typeId(), obj) {}
- EventRelation relation() const
- {
- return contentPart<EventRelation>(RelatesToKey);
- }
-};
-REGISTER_EVENT_TYPE(ReactionEvent)
+DEFINE_SIMPLE_EVENT(ReactionEvent, RoomEvent, "m.reaction", EventRelation,
+ relation, "m.relates_to")
} // namespace Quotient