diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-03-05 10:08:30 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-03-05 10:24:10 +0900 |
commit | 0be3571d7c96e3df7ec523217e02d58850c7fe73 (patch) | |
tree | aa733d890ee6617a0eca0634cb604f6f0266f6da /room.cpp | |
parent | bc08637eaaf25fb83b685e48e86553d3edacc09a (diff) | |
download | libquotient-0be3571d7c96e3df7ec523217e02d58850c7fe73.tar.gz libquotient-0be3571d7c96e3df7ec523217e02d58850c7fe73.zip |
Support saving account data on the server
Closes #152. Saving of specific event types should be added separately.
Diffstat (limited to 'room.cpp')
-rw-r--r-- | room.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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 <typename EvT> + SetAccountDataPerRoomJob* setAccountData(const EvT& event) + { + return connection->callApi<SetAccountDataPerRoomJob>( + connection->userId(), id, EvT::typeId(), event.toJson()); + } + QJsonObject toJson() const; private: |