diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-07-27 18:34:28 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-07-27 18:34:28 +0900 |
commit | 84aa055bba602635599def37915b96ccf3f63484 (patch) | |
tree | 59857c792f913871ab70385fb7e9f037fa58973a /lib/events | |
parent | 284b751ee424985341812a32721227112160a905 (diff) | |
parent | c7e4d01c479452aad4616ee2d5a285f4fe0565aa (diff) | |
download | libquotient-84aa055bba602635599def37915b96ccf3f63484.tar.gz libquotient-84aa055bba602635599def37915b96ccf3f63484.zip |
Merge branch 'kitsune-local-echo'
Diffstat (limited to 'lib/events')
-rw-r--r-- | lib/events/roomevent.cpp | 5 | ||||
-rw-r--r-- | lib/events/roomevent.h | 1 |
2 files changed, 6 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()); diff --git a/lib/events/roomevent.h b/lib/events/roomevent.h index d2bc6edc..fcbb33e5 100644 --- a/lib/events/roomevent.h +++ b/lib/events/roomevent.h @@ -57,6 +57,7 @@ namespace QMatrixClient { } QString redactionReason() const; const QString& transactionId() const { return _txnId; } + QString stateKey() const; /** * Sets the transaction id for locally created events. This should be |