mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-26 11:26:01 +03:00
Fix / mark master key as trusted after self verif
This commit is contained in:
parent
b1b8513da4
commit
779026b0af
1 changed files with 12 additions and 5 deletions
|
@ -299,14 +299,21 @@ internal abstract class SASDefaultVerificationTransaction(
|
||||||
}
|
}
|
||||||
|
|
||||||
// If not me sign his MSK and upload the signature
|
// If not me sign his MSK and upload the signature
|
||||||
if (otherMasterKeyIsVerified && otherUserId != userId) {
|
if (otherMasterKeyIsVerified) {
|
||||||
// we should trust this master key
|
// we should trust this master key
|
||||||
// And check verification MSK -> SSK?
|
// And check verification MSK -> SSK?
|
||||||
crossSigningService.trustUser(otherUserId, object : MatrixCallback<Unit> {
|
if (otherUserId != userId) {
|
||||||
override fun onFailure(failure: Throwable) {
|
crossSigningService.trustUser(otherUserId, object : MatrixCallback<Unit> {
|
||||||
Timber.e(failure, "## SAS Verification: Failed to trust User $otherUserId")
|
override fun onFailure(failure: Throwable) {
|
||||||
|
Timber.e(failure, "## SAS Verification: Failed to trust User $otherUserId")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
// Notice other master key is mine because other is me
|
||||||
|
if (otherMasterKey?.trustLevel?.isVerified() == false) {
|
||||||
|
crossSigningService.markMyMasterKeyAsTrusted()
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (otherUserId == userId) {
|
if (otherUserId == userId) {
|
||||||
|
|
Loading…
Reference in a new issue