aboutsummaryrefslogtreecommitdiff
path: root/lib/events/stateevent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/events/stateevent.cpp')
-rw-r--r--lib/events/stateevent.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/events/stateevent.cpp b/lib/events/stateevent.cpp
index 204044bb..72ecd5ad 100644
--- a/lib/events/stateevent.cpp
+++ b/lib/events/stateevent.cpp
@@ -6,30 +6,29 @@
using namespace Quotient;
-StateEventBase::StateEventBase(const QJsonObject& json)
+StateEvent::StateEvent(const QJsonObject& json)
: RoomEvent(json)
{
Q_ASSERT_X(json.contains(StateKeyKeyL), __FUNCTION__,
"Attempt to create a state event without state key");
}
-StateEventBase::StateEventBase(Event::Type type, const QString& stateKey,
+StateEvent::StateEvent(Event::Type type, const QString& stateKey,
const QJsonObject& contentJson)
: RoomEvent(basicJson(type, stateKey, contentJson))
{}
-bool StateEventBase::repeatsState() const
+bool StateEvent::repeatsState() const
{
- const auto prevContentJson = unsignedPart<QJsonObject>(PrevContentKeyL);
- return fullJson().value(ContentKeyL) == prevContentJson;
+ return contentJson() == unsignedPart<QJsonObject>(PrevContentKeyL);
}
-QString StateEventBase::replacedState() const
+QString StateEvent::replacedState() const
{
return unsignedPart<QString>("replaces_state"_ls);
}
-void StateEventBase::dumpTo(QDebug dbg) const
+void StateEvent::dumpTo(QDebug dbg) const
{
if (!stateKey().isEmpty())
dbg << '<' << stateKey() << "> ";