aboutsummaryrefslogtreecommitdiff
path: root/room.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'room.cpp')
-rw-r--r--room.cpp8
1 files changed, 8 insertions, 0 deletions
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 <typename EvT>
+ SetAccountDataPerRoomJob* setAccountData(const EvT& event)
+ {
+ return connection->callApi<SetAccountDataPerRoomJob>(
+ connection->userId(), id, EvT::typeId(), event.toJson());
+ }
+
QJsonObject toJson() const;
private: