aboutsummaryrefslogtreecommitdiff
path: root/lib/events/roomevent.cpp
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-02-26 12:57:08 +0100
committerGitHub <noreply@github.com>2022-02-26 12:57:08 +0100
commit62039b527507aa6c45fbf7ac787da6234d2faac3 (patch)
treebe84dde38d9328f6278fce1b4f9e900d7e9dce2a /lib/events/roomevent.cpp
parent2aab2a0c95bbd3f12890badb58a825bb57d8e613 (diff)
parentb0e1455989405ef46eb6d9ed2cd559a1164d04f4 (diff)
downloadlibquotient-62039b527507aa6c45fbf7ac787da6234d2faac3.tar.gz
libquotient-62039b527507aa6c45fbf7ac787da6234d2faac3.zip
Merge pull request #477 from TobiasFella/work/readencryptedmessages
Diffstat (limited to 'lib/events/roomevent.cpp')
-rw-r--r--lib/events/roomevent.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/events/roomevent.cpp b/lib/events/roomevent.cpp
index 3502e3f7..2f482871 100644
--- a/lib/events/roomevent.cpp
+++ b/lib/events/roomevent.cpp
@@ -122,3 +122,18 @@ CallEventBase::CallEventBase(Event::Type type, const QJsonObject& json)
if (callId().isEmpty())
qCWarning(EVENTS) << id() << "is a call event with an empty call id";
}
+
+#ifdef Quotient_E2EE_ENABLED
+void RoomEvent::setOriginalEvent(event_ptr_tt<RoomEvent>&& originalEvent)
+{
+ _originalEvent = std::move(originalEvent);
+}
+
+const QJsonObject RoomEvent::encryptedJson() const
+{
+ if(!_originalEvent) {
+ return {};
+ }
+ return _originalEvent->fullJson();
+}
+#endif