Fix Jitsi-hosted jitsi conferences not loading (#2846)

This commit is contained in:
ganfra 2021-08-26 17:14:25 +02:00
parent 97bdd14880
commit dae035aa76
2 changed files with 3 additions and 3 deletions

1
changelog.d/2846.bugfix Normal file
View File

@ -0,0 +1 @@
Jitsi-hosted jitsi conferences not loading

View File

@ -27,8 +27,7 @@ class JitsiWidgetPropertiesFactory @Inject constructor(
private val stringProvider: StringProvider private val stringProvider: StringProvider
) { ) {
fun create(url: String): JitsiWidgetProperties { fun create(url: String): JitsiWidgetProperties {
val configString = tryOrNull { Uri.parse(url) }?.fragment val configString = tryOrNull { Uri.parse(url) }?.encodedQuery
val configs = configString?.split("&") val configs = configString?.split("&")
?.map { it.split("=") } ?.map { it.split("=") }
?.filter { it.size == 2 } ?.filter { it.size == 2 }
@ -38,7 +37,7 @@ class JitsiWidgetPropertiesFactory @Inject constructor(
return JitsiWidgetProperties( return JitsiWidgetProperties(
domain = configs["conferenceDomain"] ?: stringProvider.getString(R.string.preferred_jitsi_domain), domain = configs["conferenceDomain"] ?: stringProvider.getString(R.string.preferred_jitsi_domain),
confId = configs["conferenceId"], confId = configs["conferenceId"] ?: configs["confId"],
displayName = configs["displayName"], displayName = configs["displayName"],
avatarUrl = configs["avatarUrl"] avatarUrl = configs["avatarUrl"]
) )