mailbox activation, closes #52

This commit is contained in:
Aine
2022-11-21 15:37:44 +02:00
parent a5edaaea78
commit 21772d7360
15 changed files with 186 additions and 17 deletions

View File

@@ -3,6 +3,8 @@ package bot
import (
"strings"
"maunium.net/go/mautrix/id"
"gitlab.com/etke.cc/postmoogle/utils"
)
@@ -11,6 +13,7 @@ const acBotSettingsKey = "cc.etke.postmoogle.config"
// bot options keys
const (
botOptionAdminRoom = "adminroom"
botOptionUsers = "users"
botOptionCatchAll = "catch-all"
botOptionDKIMSignature = "dkim.pub"
@@ -52,6 +55,11 @@ func (s botSettings) CatchAll() string {
return s.Get(botOptionCatchAll)
}
// AdminRoom option
func (s botSettings) AdminRoom() id.RoomID {
return id.RoomID(s.Get(botOptionAdminRoom))
}
// BanlistEnabled option
func (s botSettings) BanlistEnabled() bool {
return utils.Bool(s.Get(botOptionBanlistEnabled))