aboutsummaryrefslogtreecommitdiff
path: root/events/roomtopicevent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'events/roomtopicevent.cpp')
-rw-r--r--events/roomtopicevent.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/events/roomtopicevent.cpp b/events/roomtopicevent.cpp
index 5739d85e..7ccfc73c 100644
--- a/events/roomtopicevent.cpp
+++ b/events/roomtopicevent.cpp
@@ -24,6 +24,7 @@ class RoomTopicEvent::Private
{
public:
QString topic;
+ QString senderId;
};
RoomTopicEvent::RoomTopicEvent()
@@ -37,6 +38,11 @@ RoomTopicEvent::~RoomTopicEvent()
delete d;
}
+QString RoomTopicEvent::senderId() const
+{
+ return d->senderId;
+}
+
QString RoomTopicEvent::topic() const
{
return d->topic;
@@ -44,8 +50,9 @@ QString RoomTopicEvent::topic() const
RoomTopicEvent* RoomTopicEvent::fromJson(const QJsonObject& obj)
{
- RoomTopicEvent* e = new RoomTopicEvent();
+ auto e = new RoomTopicEvent();
e->parseJson(obj);
e->d->topic = obj.value("content").toObject().value("topic").toString();
+ e->d->senderId = obj["sender"].toString();
return e;
}