Add option to allow inviting other users in portal rooms (#77)
This doesn't mean the invited users get bridged, but for some use cases that doesn't matter
This commit is contained in:
@ -460,13 +460,17 @@ func (portal *Portal) Sync(user *User, contact whatsapp.Contact) {
|
||||
func (portal *Portal) GetBasePowerLevels() *mautrix.PowerLevels {
|
||||
anyone := 0
|
||||
nope := 99
|
||||
invite := 99
|
||||
if portal.bridge.Config.Bridge.AllowUserInvite {
|
||||
invite = 0
|
||||
}
|
||||
return &mautrix.PowerLevels{
|
||||
UsersDefault: anyone,
|
||||
EventsDefault: anyone,
|
||||
RedactPtr: &anyone,
|
||||
StateDefaultPtr: &nope,
|
||||
BanPtr: &nope,
|
||||
InvitePtr: &nope,
|
||||
InvitePtr: &invite,
|
||||
Users: map[string]int{
|
||||
portal.MainIntent().UserID: 100,
|
||||
},
|
||||
|
Reference in New Issue
Block a user