This commit is contained in:
Hugh Nimmo-Smith 2022-10-17 16:13:49 +01:00
parent e877feed6e
commit 623277e31f
2 changed files with 5 additions and 8 deletions

View File

@ -24,12 +24,8 @@ import org.matrix.android.sdk.api.logger.LoggerTag
import org.matrix.android.sdk.api.rendezvous.RendezvousChannel
import org.matrix.android.sdk.api.rendezvous.RendezvousFailureReason
import org.matrix.android.sdk.api.rendezvous.RendezvousTransport
import org.matrix.android.sdk.api.rendezvous.model.ECDHRendezvous
import org.matrix.android.sdk.api.rendezvous.model.ECDHRendezvousCode
import org.matrix.android.sdk.api.rendezvous.model.RendezvousError
import org.matrix.android.sdk.api.rendezvous.model.RendezvousIntent
import org.matrix.android.sdk.api.rendezvous.model.SecureRendezvousChannelAlgorithm
import org.matrix.android.sdk.api.rendezvous.model.SimpleHttpRendezvousTransportDetails
import org.matrix.android.sdk.api.util.MatrixJsonParser
import org.matrix.android.sdk.internal.extensions.toUnsignedInt
import org.matrix.olm.OlmSAS

View File

@ -143,10 +143,11 @@ class SimpleHttpRendezvousTransport(rendezvousUri: String?) : RendezvousTranspor
}
private fun get404Error(): RendezvousError {
return if (expiresAt != null && Date() > expiresAt)
RendezvousError("Expired", RendezvousFailureReason.Expired)
else
RendezvousError("Received unexpected 404", RendezvousFailureReason.Unknown)
if (expiresAt != null && Date() > expiresAt) {
return RendezvousError("Expired", RendezvousFailureReason.Expired)
}
return RendezvousError("Received unexpected 404", RendezvousFailureReason.Unknown)
}
override suspend fun close() {