From baae1c431e9d57cfbb54de66cec4ba4d295e8a37 Mon Sep 17 00:00:00 2001 From: Marcel Hibbe Date: Tue, 24 Sep 2024 16:25:33 +0200 Subject: [PATCH] Fix crash when externalSignalingServer is empty Otherwise, following crash happened, as it was tried to deal with the empty url: 2024-09-24 15:10:30.719 17765-17765 WebSocketInstance com.nextcloud.talk2 D restartWebSocket: /spreed 2024-09-24 15:10:30.722 17765-17765 System.err com.nextcloud.talk2 W java.lang.IllegalArgumentException: Expected URL scheme 'http' or 'https' but no scheme was found for /spree... 2024-09-24 15:10:30.723 17765-17765 System.err com.nextcloud.talk2 W at okhttp3.HttpUrl$Builder.parse$okhttp(HttpUrl.kt:1261) Signed-off-by: Marcel Hibbe --- app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt b/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt index 7d4a4d902..b3dff56de 100644 --- a/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt +++ b/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt @@ -2448,7 +2448,9 @@ class ChatActivity : } override fun onNext(signalingSettingsOverall: SignalingSettingsOverall) { - if (signalingSettingsOverall.ocs!!.settings!!.externalSignalingServer == null) { + if (signalingSettingsOverall.ocs!!.settings!!.externalSignalingServer == null || + signalingSettingsOverall.ocs!!.settings!!.externalSignalingServer?.isEmpty() == true + ) { return }