aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/room_send.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-07-04 21:34:00 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-07-04 21:34:00 +0900
commit6a9de91752dfe75e185bf90ab856367b2c804582 (patch)
tree2a12ecc84bf0055e317ef2e4aeec3439d92b2035 /lib/csapi/room_send.cpp
parentd5397fe5ae2ca34d5cfb11394dac17728a2b50ce (diff)
parent5d1dd53890611376873f6f959e206d5a56cfff70 (diff)
downloadlibquotient-6a9de91752dfe75e185bf90ab856367b2c804582.tar.gz
libquotient-6a9de91752dfe75e185bf90ab856367b2c804582.zip
Merge branch 'kitsune-events-rewritten'
Diffstat (limited to 'lib/csapi/room_send.cpp')
-rw-r--r--lib/csapi/room_send.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/csapi/room_send.cpp b/lib/csapi/room_send.cpp
index 9637a205..2b39ede2 100644
--- a/lib/csapi/room_send.cpp
+++ b/lib/csapi/room_send.cpp
@@ -18,8 +18,10 @@ class SendMessageJob::Private
QString eventId;
};
+static const auto SendMessageJobName = QStringLiteral("SendMessageJob");
+
SendMessageJob::SendMessageJob(const QString& roomId, const QString& eventType, const QString& txnId, const QJsonObject& body)
- : BaseJob(HttpVerb::Put, "SendMessageJob",
+ : BaseJob(HttpVerb::Put, SendMessageJobName,
basePath % "/rooms/" % roomId % "/send/" % eventType % "/" % txnId)
, d(new Private)
{
@@ -36,7 +38,7 @@ const QString& SendMessageJob::eventId() const
BaseJob::Status SendMessageJob::parseJson(const QJsonDocument& data)
{
auto json = data.object();
- d->eventId = fromJson<QString>(json.value("event_id"));
+ d->eventId = fromJson<QString>(json.value("event_id"_ls));
return Success;
}