diff options
Diffstat (limited to 'lib/csapi/to_device.cpp')
-rw-r--r-- | lib/csapi/to_device.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/csapi/to_device.cpp b/lib/csapi/to_device.cpp new file mode 100644 index 00000000..e893fa44 --- /dev/null +++ b/lib/csapi/to_device.cpp @@ -0,0 +1,23 @@ +/****************************************************************************** + * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN + */ + +#include "to_device.h" + +#include "converters.h" + +#include <QtCore/QStringBuilder> + +using namespace QMatrixClient; + +static const auto basePath = QStringLiteral("/_matrix/client/r0"); + +SendToDeviceJob::SendToDeviceJob(const QString& eventType, const QString& txnId, const QHash<QString, QHash<QString, QJsonObject>>& messages) + : BaseJob(HttpVerb::Put, "SendToDeviceJob", + basePath % "/sendToDevice/" % eventType % "/" % txnId) +{ + QJsonObject _data; + _data.insert("messages", toJson(messages)); + setRequestData(_data); +} + |