mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08:00
code review
This commit is contained in:
parent
87df8ab6f6
commit
a015eda72c
@ -218,8 +218,8 @@ class Rendezvous(
|
|||||||
Timber.tag(TAG).i("No master key given by verifying device")
|
Timber.tag(TAG).i("No master key given by verifying device")
|
||||||
}
|
}
|
||||||
|
|
||||||
// request secrets from the verifying device
|
// request secrets from other sessions.
|
||||||
Timber.tag(TAG).i("Requesting secrets from $verifyingDeviceId")
|
Timber.tag(TAG).i("Requesting secrets from other sessions")
|
||||||
|
|
||||||
session.sharedSecretStorageService().requestMissingSecrets()
|
session.sharedSecretStorageService().requestMissingSecrets()
|
||||||
} else {
|
} else {
|
||||||
|
@ -28,13 +28,9 @@ internal class SecretShareManager @Inject constructor(
|
|||||||
private val outgoingRequestsProcessor: OutgoingRequestsProcessor) {
|
private val outgoingRequestsProcessor: OutgoingRequestsProcessor) {
|
||||||
|
|
||||||
suspend fun requestSecretTo(deviceId: String, secretName: String) {
|
suspend fun requestSecretTo(deviceId: String, secretName: String) {
|
||||||
Timber.v("SecretShareManager requesting $deviceId, $secretName")
|
Timber.w("SecretShareManager requesting custom secrets not supported $deviceId, $secretName")
|
||||||
if (this.olmMachine.get().requestMissingSecretsFromOtherSessions()) {
|
// rust stack only support requesting secrets defined in the spec (not custom secret yet)
|
||||||
// immediately send the requests
|
requestMissingSecrets()
|
||||||
outgoingRequestsProcessor.processOutgoingRequests(this.olmMachine.get()) {
|
|
||||||
it is Request.ToDevice && it.eventType == EventType.REQUEST_SECRET
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun requestMissingSecrets() {
|
suspend fun requestMissingSecrets() {
|
||||||
|
Loading…
Reference in New Issue
Block a user