aboutsummaryrefslogtreecommitdiff
path: root/lib/connection.cpp
diff options
context:
space:
mode:
authorTobias Fella <fella@posteo.de>2022-03-06 22:54:01 +0100
committerTobias Fella <fella@posteo.de>2022-03-10 20:03:31 +0100
commit0ef080bdfa3a8a64d1faadf4a11a8b9dbb5bc055 (patch)
treeb808ebef49612bf6719fe463477a1d79cdd11c04 /lib/connection.cpp
parent30004d4e0d6aca06491777f77ed966a451eff50f (diff)
downloadlibquotient-0ef080bdfa3a8a64d1faadf4a11a8b9dbb5bc055.tar.gz
libquotient-0ef080bdfa3a8a64d1faadf4a11a8b9dbb5bc055.zip
Keep log of where we send keys and send keys to new devices and users
Diffstat (limited to 'lib/connection.cpp')
-rw-r--r--lib/connection.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp
index d01b8ac4..691f4ab3 100644
--- a/lib/connection.cpp
+++ b/lib/connection.cpp
@@ -2193,6 +2193,7 @@ bool Connection::hasOlmSession(User* user, const QString& deviceId) const
QPair<QOlmMessage::Type, QByteArray> Connection::olmEncryptMessage(User* user, const QString& device, const QByteArray& message)
{
//TODO be smarter about choosing a session; see e2ee impl guide
+ //TODO do we need to save the olm session after sending a message?
const auto& curveKey = curveKeyForUserDevice(user->id(), device);
QOlmMessage::Type type = d->olmSessions[curveKey][0]->encryptMessageType();
auto result = d->olmSessions[curveKey][0]->encrypt(message);