Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(visitors): Adds flag to enable live room feature. #1159

Merged
merged 1 commit into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions jicofo-selector/src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,10 @@ jicofo {
# Whether to require the "visitorsEnabled" flag in the MUC config form before enabling visitors for a conference.
# This allows the visitors option to be controlled per-conference.
require-muc-config-flag = false

# Whether to evaluate visitorsLive room flag, which can be controlled server-side
# via the room-metadata service
enable-live-room = false
}

xmpp {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ class VisitorsConfig private constructor() {
val requireMucConfigFlag: Boolean by config {
"jicofo.visitors.require-muc-config-flag".from(newConfig)
}

val enableLiveRoom: Boolean by config {
"jicofo.visitors.enable-live-room".from(newConfig)
}

companion object {
@JvmField
val config = VisitorsConfig()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import org.jitsi.jicofo.TaskPools
import org.jitsi.jicofo.auth.AuthenticationAuthority
import org.jitsi.jicofo.auth.ErrorFactory
import org.jitsi.jicofo.metrics.JicofoMetricsContainer
import org.jitsi.jicofo.visitors.VisitorsConfig
import org.jitsi.utils.OrderedJsonObject
import org.jitsi.utils.logging2.createLogger
import org.jitsi.xmpp.extensions.jitsimeet.ConferenceIq
Expand Down Expand Up @@ -97,7 +98,7 @@ class ConferenceIqHandler(

val visitorSupported = query.properties.any { it.name == "visitors-version" }
val visitorRequested = query.properties.any { it.name == "visitor" && it.value == "true" }
if (visitorRequested && conference?.chatRoom?.visitorsLive != true) {
if (visitorRequested && VisitorsConfig.config.enableLiveRoom && conference?.chatRoom?.visitorsLive != true) {
response.isReady = false
response.addProperty(ConferenceIq.Property("live", "false"))
return response
Expand Down
Loading