diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-07-29 18:13:14 +0200 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-08-05 12:36:44 +0200 |
commit | 3214feeb031fa231c7c42c21c53410302966e32e (patch) | |
tree | 4ed144212698e5269be970bbffd459949ea5fd6e /lib/events/stateevent.h | |
parent | deb6c1141af445de6f3f1fd5afc83ed2ac4def4b (diff) | |
download | libquotient-3214feeb031fa231c7c42c21c53410302966e32e.tar.gz libquotient-3214feeb031fa231c7c42c21c53410302966e32e.zip |
eventloader.h: use basicJson() in a uniform way
There's no particular reason the order of parameters in
StateEventBase::basicJson() should be as it was, and (the only)
loadStateEvent() usage in room.cpp suggests the unified order is more
convenient. Besides, this order is aligned with that in
the StateEventBase constructor.
Diffstat (limited to 'lib/events/stateevent.h')
-rw-r--r-- | lib/events/stateevent.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/events/stateevent.h b/lib/events/stateevent.h index 343e87a5..9f1d7118 100644 --- a/lib/events/stateevent.h +++ b/lib/events/stateevent.h @@ -19,12 +19,12 @@ public: //! Make a minimal correct Matrix state event JSON static QJsonObject basicJson(const QString& matrixTypeId, - const QJsonObject& content, - const QString& stateKey = {}) + const QString& stateKey = {}, + const QJsonObject& contentJson = {}) { return { { TypeKey, matrixTypeId }, { StateKeyKey, stateKey }, - { ContentKey, content } }; + { ContentKey, contentJson } }; } bool isStateEvent() const override { return true; } @@ -41,7 +41,7 @@ inline QJsonObject basicStateEventJson(const QString& matrixTypeId, const QJsonObject& content, const QString& stateKey = {}) { - return StateEventBase::basicJson(matrixTypeId, content, stateKey); + return StateEventBase::basicJson(matrixTypeId, stateKey, content); } //! \brief Override RoomEvent factory with that from StateEventBase if JSON has |