diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-06-08 23:24:51 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-06-08 23:24:51 +0900 |
commit | 6767cb8eccea7b74531f59f165a28afa0bec61f4 (patch) | |
tree | ea3ffe2fc07d3a9b7b48ee2ab37b0fe594f1af85 /lib/events | |
parent | 4b1b308f28bdaef598a5dfc249d7af6a0346b367 (diff) | |
download | libquotient-6767cb8eccea7b74531f59f165a28afa0bec61f4.tar.gz libquotient-6767cb8eccea7b74531f59f165a28afa0bec61f4.zip |
csapi: Fix boolean query parameters incorrectly passed
Diffstat (limited to 'lib/events')
-rw-r--r-- | lib/events/event.h | 4 | ||||
-rw-r--r-- | lib/events/roommessageevent.h | 2 |
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"; } |