aboutsummaryrefslogtreecommitdiff
path: root/events/event.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2017-12-31 08:53:32 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2017-12-31 08:53:32 +0900
commit0b5f0deb773f850d1b905fafc656f67f5b63de24 (patch)
treeb5e0ad5a4558a86d9c95a5d14cc3595e0fa2b5d8 /events/event.cpp
parentcbfe29b3435fbe47fee268facbe6a82000fce0ad (diff)
parent2c440249052b0d518fccd953a7dc657f9eed7ab7 (diff)
downloadlibquotient-0b5f0deb773f850d1b905fafc656f67f5b63de24.tar.gz
libquotient-0b5f0deb773f850d1b905fafc656f67f5b63de24.zip
Merge branch 'master' into kitsune-gtad
Diffstat (limited to 'events/event.cpp')
-rw-r--r--events/event.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/events/event.cpp b/events/event.cpp
index e74bc114..c7345a13 100644
--- a/events/event.cpp
+++ b/events/event.cpp
@@ -144,3 +144,13 @@ RoomEventPtr _impl::doMakeEvent(const QJsonObject& obj)
RoomAvatarEvent, EncryptionEvent, RedactionEvent>
(obj, obj["type"].toString()) };
}
+
+StateEventBase::~StateEventBase() = default;
+
+bool StateEventBase::repeatsState() const
+{
+ auto contentJson = originalJsonObject().value("content");
+ auto prevContentJson = originalJsonObject().value("unsigned")
+ .toObject().value("prev_content");
+ return contentJson == prevContentJson;
+}