diff options
Diffstat (limited to 'lib/events/receiptevent.h')
-rw-r--r-- | lib/events/receiptevent.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/events/receiptevent.h b/lib/events/receiptevent.h index a02f4592..b87e00f6 100644 --- a/lib/events/receiptevent.h +++ b/lib/events/receiptevent.h @@ -19,12 +19,17 @@ struct ReceiptsForEvent { }; using EventsWithReceipts = QVector<ReceiptsForEvent>; -class QUOTIENT_API ReceiptEvent : public Event { +template <> +QUOTIENT_API EventsWithReceipts fromJson(const QJsonObject& json); +QUOTIENT_API QJsonObject toJson(const EventsWithReceipts& ewrs); + +class QUOTIENT_API ReceiptEvent + : public EventTemplate<ReceiptEvent, Event, EventsWithReceipts> { public: QUO_EVENT(ReceiptEvent, "m.receipt") - explicit ReceiptEvent(const EventsWithReceipts& ewrs); - explicit ReceiptEvent(const QJsonObject& obj) : Event(typeId(), obj) {} + using EventTemplate::EventTemplate; - EventsWithReceipts eventsWithReceipts() const; + [[deprecated("Use content() instead")]] + EventsWithReceipts eventsWithReceipts() const { return content(); } }; } // namespace Quotient |