diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-04-16 22:23:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-16 22:23:53 +0200 |
commit | 87e8d6d6ef325f176a7d3b5da441569f9b24c847 (patch) | |
tree | 671133c8974569b182a27d82d627929addeb5ad6 /lib/e2ee | |
parent | fc3ad90a054e3c674127a0cdd385ddbb98cf2010 (diff) | |
parent | c0c4cd014718fdb54ee691ccbdab46981e15d25f (diff) | |
download | libquotient-87e8d6d6ef325f176a7d3b5da441569f9b24c847.tar.gz libquotient-87e8d6d6ef325f176a7d3b5da441569f9b24c847.zip |
Merge pull request #544 from TobiasFella/checkedkey
Check edKey when receiving an olm message and prepare for MSC 3700
Diffstat (limited to 'lib/e2ee')
-rw-r--r-- | lib/e2ee/qolminboundsession.cpp | 18 | ||||
-rw-r--r-- | lib/e2ee/qolminboundsession.h | 11 |
2 files changed, 29 insertions, 0 deletions
diff --git a/lib/e2ee/qolminboundsession.cpp b/lib/e2ee/qolminboundsession.cpp index 2e9cc716..60d871ef 100644 --- a/lib/e2ee/qolminboundsession.cpp +++ b/lib/e2ee/qolminboundsession.cpp @@ -149,3 +149,21 @@ bool QOlmInboundGroupSession::isVerified() const { return olm_inbound_group_session_is_verified(m_groupSession) != 0; } + +QString QOlmInboundGroupSession::olmSessionId() const +{ + return m_olmSessionId; +} +void QOlmInboundGroupSession::setOlmSessionId(const QString& olmSessionId) +{ + m_olmSessionId = olmSessionId; +} + +QString QOlmInboundGroupSession::senderId() const +{ + return m_senderId; +} +void QOlmInboundGroupSession::setSenderId(const QString& senderId) +{ + m_senderId = senderId; +} diff --git a/lib/e2ee/qolminboundsession.h b/lib/e2ee/qolminboundsession.h index 437f753d..32112b97 100644 --- a/lib/e2ee/qolminboundsession.h +++ b/lib/e2ee/qolminboundsession.h @@ -41,9 +41,20 @@ public: QByteArray sessionId() const; bool isVerified() const; + //! The olm session that this session was received from. + //! Required to get the device this session is from. + QString olmSessionId() const; + void setOlmSessionId(const QString& setOlmSessionId); + + //! The sender of this session. + QString senderId() const; + void setSenderId(const QString& senderId); + QOlmInboundGroupSession(OlmInboundGroupSession* session); private: OlmInboundGroupSession* m_groupSession; + QString m_olmSessionId; + QString m_senderId; }; using QOlmInboundGroupSessionPtr = std::unique_ptr<QOlmInboundGroupSession>; |