summary refs log tree commit diff
path: root/src/DeviceVerificationFlow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/DeviceVerificationFlow.cpp')
-rw-r--r--src/DeviceVerificationFlow.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/DeviceVerificationFlow.cpp b/src/DeviceVerificationFlow.cpp
index 1ffb8b3e..f692629e 100644
--- a/src/DeviceVerificationFlow.cpp
+++ b/src/DeviceVerificationFlow.cpp
@@ -761,6 +761,14 @@ DeviceVerificationFlow::acceptDevice()
                 cache::markDeviceVerified(this->toClient.to_string(), this->deviceId.toStdString());
                 this->sendVerificationDone();
                 setState(Success);
+
+                // Request secrets. We should probably check somehow, if a device knowns about the
+                // secrets.
+                if (utils::localUser().toStdString() == this->toClient.to_string() &&
+                    (!cache::secret(mtx::secret_storage::secrets::cross_signing_self_signing) ||
+                     !cache::secret(mtx::secret_storage::secrets::cross_signing_user_signing))) {
+                        olm::request_cross_signing_keys();
+                }
         }
 }