From 6f5c83026a57ec97586bdaa6bba27b569018be9e Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Fri, 3 Jul 2020 17:29:49 +0200 Subject: [PATCH] Fixed encryption toggle visible in chat room creation when using a non compatible account --- app/src/main/java/org/linphone/utils/LinphoneUtils.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/linphone/utils/LinphoneUtils.kt b/app/src/main/java/org/linphone/utils/LinphoneUtils.kt index d54eb705f..4cb630875 100644 --- a/app/src/main/java/org/linphone/utils/LinphoneUtils.kt +++ b/app/src/main/java/org/linphone/utils/LinphoneUtils.kt @@ -40,14 +40,14 @@ class LinphoneUtils { fun isLimeAvailable(): Boolean { val core = coreContext.core - val defaultProxy = core.defaultProxyConfig - return core.limeX3DhAvailable() && core.limeX3DhEnabled() && core.limeX3DhServerUrl != null && defaultProxy != null + return core.limeX3DhAvailable() && core.limeX3DhEnabled() && + core.limeX3DhServerUrl != null && + core.defaultProxyConfig?.conferenceFactoryUri != null } fun isGroupChatAvailable(): Boolean { val core = coreContext.core - val defaultProxy = core.defaultProxyConfig - return defaultProxy != null && defaultProxy.conferenceFactoryUri != null + return core.defaultProxyConfig?.conferenceFactoryUri != null } fun createOneToOneChatRoom(participant: Address, isSecured: Boolean = false): ChatRoom? {