aboutsummaryrefslogtreecommitdiff
path: root/jobs/roommessagesjob.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2017-11-28 12:42:03 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2017-11-28 12:42:03 +0900
commit357625eb55e2f4569bb487ffe14a9236188e25f3 (patch)
treed39340ab74f25a23a5855f679973628f7457fd87 /jobs/roommessagesjob.cpp
parent94e6636d8225a0561ed7df3fa8081c5b0183610c (diff)
parent8f762a2458db773f6db24b568b2e944427297c2b (diff)
downloadlibquotient-357625eb55e2f4569bb487ffe14a9236188e25f3.tar.gz
libquotient-357625eb55e2f4569bb487ffe14a9236188e25f3.zip
Merge branch 'master' into kitsune-gtad
Diffstat (limited to 'jobs/roommessagesjob.cpp')
-rw-r--r--jobs/roommessagesjob.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/jobs/roommessagesjob.cpp b/jobs/roommessagesjob.cpp
index 078c692a..9af1b3a6 100644
--- a/jobs/roommessagesjob.cpp
+++ b/jobs/roommessagesjob.cpp
@@ -30,7 +30,7 @@ class RoomMessagesJob::Private
RoomMessagesJob::RoomMessagesJob(const QString& roomId, const QString& from,
int limit, FetchDirection dir)
: BaseJob(HttpVerb::Get, "RoomMessagesJob",
- QString("/_matrix/client/r0/rooms/%1/messages").arg(roomId),
+ QStringLiteral("/_matrix/client/r0/rooms/%1/messages").arg(roomId),
Query(
{ { "from", from }
, { "dir", dir == FetchDirection::Backward ? "b" : "f" }
@@ -58,8 +58,8 @@ QString RoomMessagesJob::end() const
BaseJob::Status RoomMessagesJob::parseJson(const QJsonDocument& data)
{
- QJsonObject obj = data.object();
- d->events.assign(makeEvents<RoomEvent>(obj.value("chunk").toArray()));
+ const auto obj = data.object();
+ d->events.fromJson(obj, "chunk");
d->end = obj.value("end").toString();
return Success;
}