aboutsummaryrefslogtreecommitdiff
path: root/lib/events
diff options
context:
space:
mode:
Diffstat (limited to 'lib/events')
-rw-r--r--lib/events/event.h4
-rw-r--r--lib/events/roommessageevent.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/events/event.h b/lib/events/event.h
index 8449c2ec..ed212759 100644
--- a/lib/events/event.h
+++ b/lib/events/event.h
@@ -100,6 +100,8 @@ namespace QMatrixClient
const QJsonObject contentJson() const;
+ virtual QJsonObject toJson() const { Q_ASSERT(false); }
+
private:
Type _type;
QJsonObject _originalJson;
@@ -273,7 +275,7 @@ namespace QMatrixClient
, _content(std::forward<ContentParamTs>(contentParams)...)
{ }
- QJsonObject toJson() const { return _content.toJson(); }
+ QJsonObject toJson() const override { return _content.toJson(); }
const ContentT& content() const { return _content; }
/** @deprecated Use prevContent instead */
diff --git a/lib/events/roommessageevent.h b/lib/events/roommessageevent.h
index dc734b6e..075d7188 100644
--- a/lib/events/roommessageevent.h
+++ b/lib/events/roommessageevent.h
@@ -63,7 +63,7 @@ namespace QMatrixClient
bool hasFileContent() const;
bool hasThumbnail() const;
- QJsonObject toJson() const;
+ QJsonObject toJson() const override;
static constexpr const char* typeId() { return "m.room.message"; }