diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/events/stateevent.cpp | 5 | ||||
-rw-r--r-- | lib/events/stateevent.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/events/stateevent.cpp b/lib/events/stateevent.cpp index 280c334c..fd8079be 100644 --- a/lib/events/stateevent.cpp +++ b/lib/events/stateevent.cpp @@ -29,6 +29,11 @@ bool StateEventBase::repeatsState() const return fullJson().value(ContentKeyL) == prevContentJson; } +QString StateEventBase::replacedState() const +{ + return unsignedJson().value("replaces_state"_ls).toString(); +} + void StateEventBase::dumpTo(QDebug dbg) const { if (!stateKey().isEmpty()) diff --git a/lib/events/stateevent.h b/lib/events/stateevent.h index d50500f2..d4a7e8b3 100644 --- a/lib/events/stateevent.h +++ b/lib/events/stateevent.h @@ -30,6 +30,7 @@ namespace QMatrixClient { ~StateEventBase() override = default; bool isStateEvent() const override { return true; } + QString replacedState() const; void dumpTo(QDebug dbg) const override; virtual bool repeatsState() const; |