aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTobias Fella <9750016+TobiasFella@users.noreply.github.com>2021-12-10 16:15:50 +0100
committerGitHub <noreply@github.com>2021-12-10 16:15:50 +0100
commitb4a6070d44140a3cbc931b18530721e31f069455 (patch)
treef2b9d51b6156e0cdea3d7be33985a8599e761fe4 /lib
parentb4cc38fc7c2c63d8122106a2451aec2c60176a4b (diff)
downloadlibquotient-b4a6070d44140a3cbc931b18530721e31f069455.tar.gz
libquotient-b4a6070d44140a3cbc931b18530721e31f069455.zip
Apply suggestions from code review
Co-authored-by: Alexey Rusakov <Kitsune-Ral@users.sf.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/events/roomevent.cpp2
-rw-r--r--lib/events/roomevent.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/events/roomevent.cpp b/lib/events/roomevent.cpp
index dbce2255..eb5d0485 100644
--- a/lib/events/roomevent.cpp
+++ b/lib/events/roomevent.cpp
@@ -128,7 +128,7 @@ CallEventBase::CallEventBase(Event::Type type, const QJsonObject& json)
}
#ifdef Quotient_E2EE_ENABLED
-void RoomEvent::setOriginalEvent(event_ptr_tt<RoomEvent> originalEvent)
+void RoomEvent::setOriginalEvent(event_ptr_tt<RoomEvent>&& originalEvent)
{
_originalEvent = std::move(originalEvent);
}
diff --git a/lib/events/roomevent.h b/lib/events/roomevent.h
index 36b45f09..3d46bf9b 100644
--- a/lib/events/roomevent.h
+++ b/lib/events/roomevent.h
@@ -61,7 +61,8 @@ public:
void addId(const QString& newId);
#ifdef Quotient_E2EE_ENABLED
- void setOriginalEvent(event_ptr_tt<RoomEvent> originalEvent);
+ void setOriginalEvent(event_ptr_tt<RoomEvent>&& originalEvent);
+ const RoomEvent* originalEvent() { return _originalEvent.get(); }
const QJsonObject encryptedJson() const;
#endif