aboutsummaryrefslogtreecommitdiff
path: root/events/event.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'events/event.cpp')
-rw-r--r--events/event.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/events/event.cpp b/events/event.cpp
index 55114e6b..43604b23 100644
--- a/events/event.cpp
+++ b/events/event.cpp
@@ -43,6 +43,7 @@ class Event::Private
QString id;
QDateTime timestamp;
QString roomId;
+ QString senderId;
QString originalJson;
};
@@ -77,6 +78,11 @@ QString Event::roomId() const
return d->roomId;
}
+QString Event::senderId() const
+{
+ return d->senderId;
+}
+
QString Event::originalJson() const
{
return d->originalJson;
@@ -131,10 +137,8 @@ bool Event::parseJson(const QJsonObject& obj)
qDebug() << formatJson << obj;
}
}
- if( obj.contains("room_id") )
- {
- d->roomId = obj.value("room_id").toString();
- }
+ d->roomId = obj.value("room_id").toString();
+ d->senderId = obj.value("sender").toString();
return correct;
}