diff options
Diffstat (limited to 'lib/csapi/room_send.cpp')
-rw-r--r-- | lib/csapi/room_send.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/csapi/room_send.cpp b/lib/csapi/room_send.cpp index 0d25eb69..2bf42522 100644 --- a/lib/csapi/room_send.cpp +++ b/lib/csapi/room_send.cpp @@ -15,25 +15,24 @@ static const auto basePath = QStringLiteral("/_matrix/client/r0"); class SendMessageJob::Private { public: - QString eventId; + QString eventId; }; static const auto SendMessageJobName = QStringLiteral("SendMessageJob"); -SendMessageJob::SendMessageJob(const QString& roomId, const QString& eventType, const QString& txnId, const QJsonObject& body) +SendMessageJob::SendMessageJob(const QString& roomId, const QString& eventType, + const QString& txnId, const QJsonObject& body) : BaseJob(HttpVerb::Put, SendMessageJobName, - basePath % "/rooms/" % roomId % "/send/" % eventType % "/" % txnId) - , d(new Private) + basePath % "/rooms/" % roomId % "/send/" % eventType % "/" + % txnId), + d(new Private) { setRequestData(Data(toJson(body))); } SendMessageJob::~SendMessageJob() = default; -const QString& SendMessageJob::eventId() const -{ - return d->eventId; -} +const QString& SendMessageJob::eventId() const { return d->eventId; } BaseJob::Status SendMessageJob::parseJson(const QJsonDocument& data) { @@ -41,4 +40,3 @@ BaseJob::Status SendMessageJob::parseJson(const QJsonDocument& data) fromJson(json.value("event_id"_ls), d->eventId); return Success; } - |