diff options
Diffstat (limited to 'lib/csapi/to_device.cpp')
-rw-r--r-- | lib/csapi/to_device.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/lib/csapi/to_device.cpp b/lib/csapi/to_device.cpp index 7c7f495a..28c4115a 100644 --- a/lib/csapi/to_device.cpp +++ b/lib/csapi/to_device.cpp @@ -4,22 +4,18 @@ #include "to_device.h" -#include "converters.h" - #include <QtCore/QStringBuilder> -using namespace QMatrixClient; - -static const auto basePath = QStringLiteral("/_matrix/client/r0"); +using namespace Quotient; -static const auto SendToDeviceJobName = QStringLiteral("SendToDeviceJob"); - -SendToDeviceJob::SendToDeviceJob(const QString& eventType, const QString& txnId, const QHash<QString, QHash<QString, QJsonObject>>& messages) - : BaseJob(HttpVerb::Put, SendToDeviceJobName, - basePath % "/sendToDevice/" % eventType % "/" % txnId) +SendToDeviceJob::SendToDeviceJob( + const QString& eventType, const QString& txnId, + const QHash<QString, QHash<QString, QJsonObject>>& messages) + : BaseJob(HttpVerb::Put, QStringLiteral("SendToDeviceJob"), + QStringLiteral("/_matrix/client/r0") % "/sendToDevice/" + % eventType % "/" % txnId) { QJsonObject _data; addParam<IfNotEmpty>(_data, QStringLiteral("messages"), messages); - setRequestData(_data); + setRequestData(std::move(_data)); } - |