diff options
author | Tobias Fella <fella@posteo.de> | 2021-08-18 02:00:15 +0200 |
---|---|---|
committer | Tobias Fella <fella@posteo.de> | 2021-12-01 21:56:59 +0100 |
commit | 0583534d83f902235b46ef6761d6698ddb6e6aba (patch) | |
tree | 2fb3347397058f77bcb28a165a362b62de625029 /lib/room.cpp | |
parent | 244938d2c99674ba09f3c1f92b2a4f8507ac5e58 (diff) | |
download | libquotient-0583534d83f902235b46ef6761d6698ddb6e6aba.tar.gz libquotient-0583534d83f902235b46ef6761d6698ddb6e6aba.zip |
Store pickling key in qtkeychain and pickle encrypted
Diffstat (limited to 'lib/room.cpp')
-rw-r--r-- | lib/room.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/room.cpp b/lib/room.cpp index a1354fc5..b60a23f2 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -394,7 +394,7 @@ public: auto pickle = s.toObject()["pickle"].toString().toLatin1(); auto senderKey = s.toObject()["sender_key"].toString(); auto sessionId = s.toObject()["session_id"].toString(); - auto sessionResult = QOlmInboundGroupSession::unpickle(pickle, Unencrypted{}); + auto sessionResult = QOlmInboundGroupSession::unpickle(pickle, connection->picklingMode()); if(std::holds_alternative<QOlmError>(sessionResult)) { qCWarning(E2EE) << "Failed to unpickle olm session"; continue; @@ -421,7 +421,7 @@ public: { QJsonArray sessionsJson; for (const auto &session : groupSessions) { - auto pickleResult = session.second->pickle(Unencrypted{}); + auto pickleResult = session.second->pickle(connection->picklingMode()); sessionsJson += QJsonObject { {QStringLiteral("sender_key"), session.first.first}, {QStringLiteral("session_id"), session.first.second}, @@ -2659,7 +2659,6 @@ Room::Changes Room::Private::addNewMessageEvents(RoomEvents&& events) //TODO should this be done before dropDuplicateEvents? for(long unsigned int i = 0; i < events.size(); i++) { if(auto* encrypted = eventCast<EncryptedEvent>(events[i])) { - qDebug() << "Encrypted Event"; auto decrypted = q->decryptMessage(*encrypted); if(decrypted) { events[i] = std::move(decrypted); |