Only accept bot invites from user level

This commit is contained in:
Tulir Asokan 2022-05-28 22:56:46 +03:00
commit 45d989575c

View file

@ -123,7 +123,7 @@ func (mx *MatrixHandler) HandleBotInvite(evt *event.Event) {
return
}
if user.GetPermissionLevel() <= bridgeconfig.PermissionLevelBlock {
if user.GetPermissionLevel() < bridgeconfig.PermissionLevelUser {
_, _ = intent.SendNotice(evt.RoomID, "You are not whitelisted to use this bridge.\n"+
"If you're the owner of this bridge, see the bridge.permissions section in your config file.")
_, _ = intent.LeaveRoom(evt.RoomID)