From 0be3571d7c96e3df7ec523217e02d58850c7fe73 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Mon, 5 Mar 2018 10:08:30 +0900 Subject: Support saving account data on the server Closes #152. Saving of specific event types should be added separately. --- room.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'room.cpp') diff --git a/room.cpp b/room.cpp index cfa705bb..e03a2b5b 100644 --- a/room.cpp +++ b/room.cpp @@ -24,6 +24,7 @@ #include "jobs/generated/leaving.h" #include "jobs/generated/receipts.h" #include "jobs/generated/redaction.h" +#include "jobs/generated/account-data.h" #include "jobs/setroomstatejob.h" #include "events/simplestateevents.h" #include "events/roomavatarevent.h" @@ -202,6 +203,13 @@ class Room::Private */ void processRedaction(RoomEventPtr redactionEvent); + template + SetAccountDataPerRoomJob* setAccountData(const EvT& event) + { + return connection->callApi( + connection->userId(), id, EvT::typeId(), event.toJson()); + } + QJsonObject toJson() const; private: -- cgit v1.2.3