Skip to content

Commit 258eb98

Browse files
authored
Add a config option to require the visitors flag in MUC config. (#1127)
1 parent b33632d commit 258eb98

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

jicofo-selector/src/main/resources/reference.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,10 @@ jicofo {
393393
# With this option enabled the second part is started automatically as soon as any visitors join. Otherwise, jicofo
394394
# waits to receive a <broadcast enabled=true> extension from one of the moderators in the conference.
395395
auto-enable-broadcast = true
396+
397+
# Whether to require the "visitorsEnabled" flag in the MUC config form before enabling visitors for a conference.
398+
# This allows the visitors option to be controlled per-conference.
399+
require-muc-config-flag = false
396400
}
397401

398402
xmpp {

jicofo/src/main/java/org/jitsi/jicofo/conference/JitsiMeetConferenceImpl.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1681,6 +1681,13 @@ public String redirectVisitor(boolean visitorRequested)
16811681
{
16821682
return null;
16831683
}
1684+
if (VisitorsConfig.config.getRequireMucConfigFlag())
1685+
{
1686+
if (chatRoom == null || !Boolean.TRUE.equals(chatRoom.getVisitorsEnabled()))
1687+
{
1688+
return null;
1689+
}
1690+
}
16841691
// We don't support visitors in breakout rooms.
16851692
if (mainRoomJid != null)
16861693
{

jicofo/src/main/kotlin/org/jitsi/jicofo/visitors/VisitorsConfig.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ class VisitorsConfig private constructor() {
4040
"jicofo.visitors.auto-enable-broadcast".from(newConfig)
4141
}
4242

43+
val requireMucConfigFlag: Boolean by config {
44+
"jicofo.visitors.require-muc-config-flag".from(newConfig)
45+
}
4346
companion object {
4447
@JvmField
4548
val config = VisitorsConfig()

0 commit comments

Comments
 (0)