dep | Adapt rust-sdk, rename PreviouslyVerified to VerificationViolation
This commit is contained in:
parent
2c7e84a44b
commit
0cc751d168
3 changed files with 7 additions and 7 deletions
|
|
@ -26,8 +26,8 @@ sealed interface MessageShield {
|
|||
/** An unencrypted event in an encrypted room. */
|
||||
data class SentInClear(val isCritical: Boolean) : MessageShield
|
||||
|
||||
/** The sender was previously verified but changed their identity. */
|
||||
data class PreviouslyVerified(val isCritical: Boolean) : MessageShield
|
||||
/** The sender was previously verified but is not anymore. */
|
||||
data class VerificationViolation(val isCritical: Boolean) : MessageShield
|
||||
}
|
||||
|
||||
val MessageShield.isCritical: Boolean
|
||||
|
|
@ -37,5 +37,5 @@ val MessageShield.isCritical: Boolean
|
|||
is MessageShield.UnsignedDevice -> isCritical
|
||||
is MessageShield.UnverifiedIdentity -> isCritical
|
||||
is MessageShield.SentInClear -> isCritical
|
||||
is MessageShield.PreviouslyVerified -> isCritical
|
||||
is MessageShield.VerificationViolation -> isCritical
|
||||
}
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ private fun ShieldState?.map(): MessageShield? {
|
|||
ShieldStateCode.UNSIGNED_DEVICE -> MessageShield.UnsignedDevice(isCritical)
|
||||
ShieldStateCode.UNVERIFIED_IDENTITY -> MessageShield.UnverifiedIdentity(isCritical)
|
||||
ShieldStateCode.SENT_IN_CLEAR -> MessageShield.SentInClear(isCritical)
|
||||
ShieldStateCode.PREVIOUSLY_VERIFIED -> MessageShield.PreviouslyVerified(isCritical)
|
||||
ShieldStateCode.VERIFICATION_VIOLATION -> MessageShield.VerificationViolation(isCritical)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue