Do not show ZRTP auth token validation dialog if the token is null

This commit is contained in:
Sylvain Berfini 2022-10-13 10:03:20 +02:00
parent 072db50727
commit ea9d6c48bc

View file

@ -53,10 +53,9 @@ class StatusViewModel : StatusViewModel() {
on: Boolean, on: Boolean,
authenticationToken: String? authenticationToken: String?
) { ) {
updateEncryptionInfo(call)
if (call.currentParams.mediaEncryption == MediaEncryption.ZRTP && !call.authenticationTokenVerified) { if (call.currentParams.mediaEncryption == MediaEncryption.ZRTP && !call.authenticationTokenVerified) {
showZrtpDialogEvent.value = Event(call) showZrtpDialogEvent.value = Event(call)
} else {
updateEncryptionInfo(call)
} }
} }
@ -95,7 +94,7 @@ class StatusViewModel : StatusViewModel() {
fun showZrtpDialog() { fun showZrtpDialog() {
val currentCall = coreContext.core.currentCall val currentCall = coreContext.core.currentCall
if (currentCall?.currentParams?.mediaEncryption == MediaEncryption.ZRTP) { if (currentCall?.authenticationToken != null && currentCall.currentParams.mediaEncryption == MediaEncryption.ZRTP) {
showZrtpDialogEvent.value = Event(currentCall) showZrtpDialogEvent.value = Event(currentCall)
} }
} }