ElementWeb does not pass confId as a URL parameter anymore (and so does Element Android)

This commit is contained in:
Benoit Marty 2021-02-05 13:50:13 +01:00
parent 6ecd63bf5d
commit dbe14ce0bb
2 changed files with 2 additions and 3 deletions

View File

@ -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 ?: ""
)
}

View File

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