allow reserved mailboxes, closes #43

This commit is contained in:
Aine
2022-11-20 20:55:41 +02:00
parent 117736dcf3
commit 6ddb894577
7 changed files with 31 additions and 8 deletions

View File

@@ -73,6 +73,15 @@ func (b *Bot) allowSend(actorID id.UserID, targetRoomID id.RoomID) bool {
return !cfg.NoSend()
}
func (b *Bot) isReserved(mailbox string) bool {
for _, reserved := range b.reservedMailboxes {
if mailbox == reserved {
return true
}
}
return false
}
// IsGreylisted checks if host is in greylist
func (b *Bot) IsGreylisted(addr net.Addr) bool {
if b.getBotSettings().Greylist() == 0 {