aboutsummaryrefslogtreecommitdiff
path: root/lib/events/encryptedevent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/events/encryptedevent.cpp')
-rw-r--r--lib/events/encryptedevent.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/events/encryptedevent.cpp b/lib/events/encryptedevent.cpp
index 9d07a35f..3af3d6ff 100644
--- a/lib/events/encryptedevent.cpp
+++ b/lib/events/encryptedevent.cpp
@@ -61,3 +61,10 @@ RoomEventPtr EncryptedEvent::createDecrypted(const QString &decrypted) const
}
return loadEvent<RoomEvent>(eventObject);
}
+
+void EncryptedEvent::setRelation(const QJsonObject& relation)
+{
+ auto content = editJson()["content"_ls].toObject();
+ content["m.relates_to"] = relation;
+ editJson()["content"] = content;
+}