aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/to_device.cpp
blob: 28c4115affc6fa779ddf51cf3929e5cb53fa88bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/******************************************************************************
 * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
 */

#include "to_device.h"

#include <QtCore/QStringBuilder>

using namespace Quotient;

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(std::move(_data));
}