mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-03 20:47:32 +01:00
Split long lines
This commit is contained in:
parent
74175ddfa0
commit
e61d563589
@ -78,21 +78,24 @@ internal class DefaultQrCodeVerificationTransaction(
|
|||||||
// check master key
|
// check master key
|
||||||
when (otherQrCodeData) {
|
when (otherQrCodeData) {
|
||||||
is QrCodeData.VerifyingAnotherUser -> {
|
is QrCodeData.VerifyingAnotherUser -> {
|
||||||
if (otherQrCodeData.otherUserMasterCrossSigningPublicKey != crossSigningService.getUserCrossSigningKeys(userId)?.masterKey()?.unpaddedBase64PublicKey) {
|
if (otherQrCodeData.otherUserMasterCrossSigningPublicKey
|
||||||
|
!= crossSigningService.getUserCrossSigningKeys(userId)?.masterKey()?.unpaddedBase64PublicKey) {
|
||||||
Timber.d("## Verification QR: Invalid other master key ${otherQrCodeData.otherUserMasterCrossSigningPublicKey}")
|
Timber.d("## Verification QR: Invalid other master key ${otherQrCodeData.otherUserMasterCrossSigningPublicKey}")
|
||||||
cancel(CancelCode.MismatchedKeys)
|
cancel(CancelCode.MismatchedKeys)
|
||||||
return
|
return
|
||||||
} else Unit
|
} else Unit
|
||||||
}
|
}
|
||||||
is QrCodeData.SelfVerifyingMasterKeyTrusted -> {
|
is QrCodeData.SelfVerifyingMasterKeyTrusted -> {
|
||||||
if (otherQrCodeData.userMasterCrossSigningPublicKey != crossSigningService.getUserCrossSigningKeys(userId)?.masterKey()?.unpaddedBase64PublicKey) {
|
if (otherQrCodeData.userMasterCrossSigningPublicKey
|
||||||
|
!= crossSigningService.getUserCrossSigningKeys(userId)?.masterKey()?.unpaddedBase64PublicKey) {
|
||||||
Timber.d("## Verification QR: Invalid other master key ${otherQrCodeData.userMasterCrossSigningPublicKey}")
|
Timber.d("## Verification QR: Invalid other master key ${otherQrCodeData.userMasterCrossSigningPublicKey}")
|
||||||
cancel(CancelCode.MismatchedKeys)
|
cancel(CancelCode.MismatchedKeys)
|
||||||
return
|
return
|
||||||
} else Unit
|
} else Unit
|
||||||
}
|
}
|
||||||
is QrCodeData.SelfVerifyingMasterKeyNotTrusted -> {
|
is QrCodeData.SelfVerifyingMasterKeyNotTrusted -> {
|
||||||
if (otherQrCodeData.userMasterCrossSigningPublicKey != crossSigningService.getUserCrossSigningKeys(userId)?.masterKey()?.unpaddedBase64PublicKey) {
|
if (otherQrCodeData.userMasterCrossSigningPublicKey
|
||||||
|
!= crossSigningService.getUserCrossSigningKeys(userId)?.masterKey()?.unpaddedBase64PublicKey) {
|
||||||
Timber.d("## Verification QR: Invalid other master key ${otherQrCodeData.userMasterCrossSigningPublicKey}")
|
Timber.d("## Verification QR: Invalid other master key ${otherQrCodeData.userMasterCrossSigningPublicKey}")
|
||||||
cancel(CancelCode.MismatchedKeys)
|
cancel(CancelCode.MismatchedKeys)
|
||||||
return
|
return
|
||||||
@ -106,7 +109,8 @@ internal class DefaultQrCodeVerificationTransaction(
|
|||||||
// Check device key if available
|
// Check device key if available
|
||||||
when (otherQrCodeData) {
|
when (otherQrCodeData) {
|
||||||
is QrCodeData.VerifyingAnotherUser -> {
|
is QrCodeData.VerifyingAnotherUser -> {
|
||||||
if (otherQrCodeData.userMasterCrossSigningPublicKey != crossSigningService.getUserCrossSigningKeys(otherUserId)?.masterKey()?.unpaddedBase64PublicKey) {
|
if (otherQrCodeData.userMasterCrossSigningPublicKey
|
||||||
|
!= crossSigningService.getUserCrossSigningKeys(otherUserId)?.masterKey()?.unpaddedBase64PublicKey) {
|
||||||
Timber.d("## Verification QR: Invalid user master key ${otherQrCodeData.userMasterCrossSigningPublicKey}")
|
Timber.d("## Verification QR: Invalid user master key ${otherQrCodeData.userMasterCrossSigningPublicKey}")
|
||||||
cancel(CancelCode.MismatchedKeys)
|
cancel(CancelCode.MismatchedKeys)
|
||||||
return
|
return
|
||||||
@ -116,14 +120,16 @@ internal class DefaultQrCodeVerificationTransaction(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
is QrCodeData.SelfVerifyingMasterKeyTrusted -> {
|
is QrCodeData.SelfVerifyingMasterKeyTrusted -> {
|
||||||
if (otherQrCodeData.otherDeviceKey != cryptoStore.getUserDevice(userId, deviceId)?.fingerprint()) {
|
if (otherQrCodeData.otherDeviceKey
|
||||||
|
!= cryptoStore.getUserDevice(userId, deviceId)?.fingerprint()) {
|
||||||
Timber.d("## Verification QR: Invalid other device key ${otherQrCodeData.otherDeviceKey}")
|
Timber.d("## Verification QR: Invalid other device key ${otherQrCodeData.otherDeviceKey}")
|
||||||
cancel(CancelCode.MismatchedKeys)
|
cancel(CancelCode.MismatchedKeys)
|
||||||
return
|
return
|
||||||
} else Unit
|
} else Unit
|
||||||
}
|
}
|
||||||
is QrCodeData.SelfVerifyingMasterKeyNotTrusted -> {
|
is QrCodeData.SelfVerifyingMasterKeyNotTrusted -> {
|
||||||
if (otherQrCodeData.deviceKey != cryptoStore.getUserDevice(otherUserId, otherDeviceId ?: "")?.fingerprint()) {
|
if (otherQrCodeData.deviceKey
|
||||||
|
!= cryptoStore.getUserDevice(otherUserId, otherDeviceId ?: "")?.fingerprint()) {
|
||||||
Timber.d("## Verification QR: Invalid device key ${otherQrCodeData.deviceKey}")
|
Timber.d("## Verification QR: Invalid device key ${otherQrCodeData.deviceKey}")
|
||||||
cancel(CancelCode.MismatchedKeys)
|
cancel(CancelCode.MismatchedKeys)
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user