diff options
author | Carl Schwan <carl@carlschwan.eu> | 2021-05-24 00:40:30 +0200 |
---|---|---|
committer | Tobias Fella <fella@posteo.de> | 2021-12-01 21:36:56 +0100 |
commit | 211d0c1b96c13f949f50799f5a4412ae31586546 (patch) | |
tree | ab15f3099452103d344c13a4c139514eff3027fa /lib/connection.cpp | |
parent | 1186c9fc980f9659191df4b3f5b540befe946dfa (diff) | |
download | libquotient-211d0c1b96c13f949f50799f5a4412ae31586546.tar.gz libquotient-211d0c1b96c13f949f50799f5a4412ae31586546.zip |
Uncomment some stuff
Diffstat (limited to 'lib/connection.cpp')
-rw-r--r-- | lib/connection.cpp | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp index b91a1a90..0c0bada6 100644 --- a/lib/connection.cpp +++ b/lib/connection.cpp @@ -109,8 +109,8 @@ public: #ifdef Quotient_E2EE_ENABLED std::unique_ptr<QOlmAccount> olmAccount; - //QScopedPointer<EncryptionManager> encryptionManager; bool isUploadingKeys = false; + QScopedPointer<EncryptionManager> encryptionManager; #endif // Quotient_E2EE_ENABLED QPointer<GetWellknownJob> resolverJob = nullptr; @@ -187,7 +187,6 @@ public: { qCWarning(E2EE) << "End-to-end encryption (E2EE) support is turned off."; return {}; - /* #ifndef Quotient_E2EE_ENABLED qCWarning(E2EE) << "End-to-end encryption (E2EE) support is turned off."; return {}; @@ -247,7 +246,6 @@ public: return std::move(decryptedEvent); #endif // Quotient_E2EE_ENABLED -*/ } }; @@ -761,7 +759,6 @@ void Connection::Private::consumePresenceData(Events&& presenceData) void Connection::Private::consumeToDeviceEvents(Events&& toDeviceEvents) { -/* #ifdef Quotient_E2EE_ENABLED // handling m.room_key to-device encrypted event visitEach(toDeviceEvents, [this](const EncryptedEvent& ee) { @@ -771,20 +768,15 @@ void Connection::Private::consumeToDeviceEvents(Events&& toDeviceEvents) return; } - // TODO: full maintaining of the device keys - // with device_lists sync extention and /keys/query - qCDebug(E2EE) << "Getting device keys for the m.room_key sender:" - << ee.senderId(); - // encryptionManager->updateDeviceKeys(); - visit(*sessionDecryptMessage(ee), [this, senderKey = ee.senderKey()](const RoomKeyEvent& roomKeyEvent) { - if (auto* detectedRoom = q->room(roomKeyEvent.roomId())) + if (auto* detectedRoom = q->room(roomKeyEvent.roomId())) { detectedRoom->handleRoomKeyEvent(roomKeyEvent, senderKey); - else + } else { qCDebug(E2EE) << "Encrypted event room id" << roomKeyEvent.roomId() << "is not found at the connection" << q->objectName(); + } }, [](const Event& evt) { qCDebug(E2EE) << "Skipping encrypted to_device event, type" @@ -792,7 +784,6 @@ void Connection::Private::consumeToDeviceEvents(Events&& toDeviceEvents) }); }); #endif -*/ } void Connection::stopSync() |