aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/room_send.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2020-06-07 19:46:40 +0200
committerKitsune Ral <Kitsune-Ral@users.sf.net>2020-06-07 19:46:40 +0200
commit32729d9a7519cd2c4cddb0174b8329c6fd4a4a83 (patch)
tree9a966d7dc0bf628f610d5de1ad64c8d29b6b26f8 /lib/csapi/room_send.cpp
parenta0430b1fb722a77ad7cbd28f181727d46d92b3a2 (diff)
downloadlibquotient-32729d9a7519cd2c4cddb0174b8329c6fd4a4a83.tar.gz
libquotient-32729d9a7519cd2c4cddb0174b8329c6fd4a4a83.zip
Update generated files according to gtad/* changes
Diffstat (limited to 'lib/csapi/room_send.cpp')
-rw-r--r--lib/csapi/room_send.cpp26
1 files changed, 3 insertions, 23 deletions
diff --git a/lib/csapi/room_send.cpp b/lib/csapi/room_send.cpp
index d278433b..63986c56 100644
--- a/lib/csapi/room_send.cpp
+++ b/lib/csapi/room_send.cpp
@@ -4,36 +4,16 @@
#include "room_send.h"
-#include "converters.h"
-
#include <QtCore/QStringBuilder>
using namespace Quotient;
-static const auto basePath = QStringLiteral("/_matrix/client/r0");
-
-class SendMessageJob::Private {
-public:
- QString eventId;
-};
-
SendMessageJob::SendMessageJob(const QString& roomId, const QString& eventType,
const QString& txnId, const QJsonObject& body)
: BaseJob(HttpVerb::Put, QStringLiteral("SendMessageJob"),
- basePath % "/rooms/" % roomId % "/send/" % eventType % "/" % txnId)
- , d(new Private)
+ QStringLiteral("/_matrix/client/r0") % "/rooms/" % roomId
+ % "/send/" % eventType % "/" % txnId)
{
setRequestData(Data(toJson(body)));
-}
-
-SendMessageJob::~SendMessageJob() = default;
-
-const QString& SendMessageJob::eventId() const { return d->eventId; }
-
-BaseJob::Status SendMessageJob::parseJson(const QJsonDocument& data)
-{
- auto json = data.object();
- fromJson(json.value("event_id"_ls), d->eventId);
-
- return Success;
+ addExpectedKey("event_id");
}