From dbe14ce0bbe612999e888a6e2aff65657fb73388 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 5 Feb 2021 13:50:13 +0100 Subject: [PATCH] ElementWeb does not pass confId as a URL parameter anymore (and so does Element Android) --- .../vector/app/features/call/conference/JitsiCallViewModel.kt | 4 +--- .../app/features/call/conference/JitsiWidgetProperties.kt | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/call/conference/JitsiCallViewModel.kt b/vector/src/main/java/im/vector/app/features/call/conference/JitsiCallViewModel.kt index 97ee41154a..1d652658b4 100644 --- a/vector/src/main/java/im/vector/app/features/call/conference/JitsiCallViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/call/conference/JitsiCallViewModel.kt @@ -64,14 +64,12 @@ class JitsiCallViewModel @AssistedInject constructor( .subscribe { val jitsiWidget = it.firstOrNull() if (jitsiWidget != null) { - val uri = Uri.parse(jitsiWidget.computedUrl) - val confId = uri.getQueryParameter("confId") val ppt = jitsiWidget.computedUrl?.let { url -> JitsiWidgetProperties(url, stringProvider) } setState { copy( widget = Success(jitsiWidget), jitsiUrl = "https://${ppt?.domain}", - confId = confId ?: "", + confId = ppt?.confId ?: "", subject = roomName ?: "" ) } diff --git a/vector/src/main/java/im/vector/app/features/call/conference/JitsiWidgetProperties.kt b/vector/src/main/java/im/vector/app/features/call/conference/JitsiWidgetProperties.kt index e4bc0ab63d..2691b71a41 100644 --- a/vector/src/main/java/im/vector/app/features/call/conference/JitsiWidgetProperties.kt +++ b/vector/src/main/java/im/vector/app/features/call/conference/JitsiWidgetProperties.kt @@ -22,6 +22,7 @@ import im.vector.app.core.resources.StringProvider class JitsiWidgetProperties(private val uriString: String, val stringProvider: StringProvider) { val domain: String by lazy { configs["conferenceDomain"] ?: stringProvider.getString(R.string.preferred_jitsi_domain) } + val confId: String? by lazy { configs["conferenceId"] } val displayName: String? by lazy { configs["displayName"] } val avatarUrl: String? by lazy { configs["avatarUrl"] }