aboutsummaryrefslogtreecommitdiff
path: root/lib/events/roomevent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/events/roomevent.cpp')
-rw-r--r--lib/events/roomevent.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/events/roomevent.cpp b/lib/events/roomevent.cpp
index 3d09af8a..75850772 100644
--- a/lib/events/roomevent.cpp
+++ b/lib/events/roomevent.cpp
@@ -75,6 +75,11 @@ QString RoomEvent::redactionReason() const
return isRedacted() ? _redactedBecause->reason() : QString{};
}
+QString RoomEvent::stateKey() const
+{
+ return fullJson()["state_key"_ls].toString();
+}
+
void RoomEvent::addId(const QString& newId)
{
Q_ASSERT(id().isEmpty()); Q_ASSERT(!newId.isEmpty());