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 <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2024-09-24 16:25:33 +02:00 committed by backportbot[bot]
parent 66f97567e0
commit baae1c431e

View file

@ -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
}