Add config option to disable using restricted join rule

This commit is contained in:
Tulir Asokan
2022-05-30 15:59:26 +03:00
parent aa666c9889
commit 5ff8a988a8
4 changed files with 6 additions and 2 deletions

View File

@@ -333,7 +333,7 @@ func (portal *Portal) CreateMatrixRoom(user *User, channel *discordgo.Channel) e
}},
})
}
if portal.Guild != nil && portal.Guild.MXID != "" {
if portal.bridge.Config.Bridge.RestrictedRooms && portal.Guild != nil && portal.Guild.MXID != "" {
// TODO don't do this for private channels in guilds
initialState = append(initialState, &event.Event{
Type: event.StateJoinRules,
@@ -346,7 +346,6 @@ func (portal *Portal) CreateMatrixRoom(user *User, channel *discordgo.Channel) e
}},
})
}
// TODO set restricted join rule based on guild
var invite []id.UserID