aboutsummaryrefslogtreecommitdiff
path: root/jobs
diff options
context:
space:
mode:
Diffstat (limited to 'jobs')
-rw-r--r--jobs/roommessagesjob.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/jobs/roommessagesjob.cpp b/jobs/roommessagesjob.cpp
index fc3f5f1e..5a97cc23 100644
--- a/jobs/roommessagesjob.cpp
+++ b/jobs/roommessagesjob.cpp
@@ -84,12 +84,7 @@ QUrlQuery RoomMessagesJob::query()
void RoomMessagesJob::parseJson(const QJsonDocument& data)
{
QJsonObject obj = data.object();
- QJsonArray chunk = obj.value("chunk").toArray();
- for( const QJsonValue& val: chunk )
- {
- Event* event = Event::fromJson(val.toObject());
- d->events.append(event);
- }
+ d->events = eventListFromJson(obj.value("chunk").toArray());
d->end = obj.value("end").toString();
emitResult();
-} \ No newline at end of file
+}