add nocc option

This commit is contained in:
Aine
2022-11-19 17:09:24 +02:00
parent 052fd5bb25
commit 5fe8603506
5 changed files with 22 additions and 1 deletions

View File

@@ -18,6 +18,7 @@ const (
roomOptionMailbox = "mailbox"
roomOptionDomain = "domain"
roomOptionNoSend = "nosend"
roomOptionNoCC = "nocc"
roomOptionNoSender = "nosender"
roomOptionNoRecipient = "norecipient"
roomOptionNoSubject = "nosubject"
@@ -62,6 +63,10 @@ func (s roomSettings) NoSend() bool {
return utils.Bool(s.Get(roomOptionNoSend))
}
func (s roomSettings) NoCC() bool {
return utils.Bool(s.Get(roomOptionNoCC))
}
func (s roomSettings) NoSender() bool {
return utils.Bool(s.Get(roomOptionNoSender))
}
@@ -146,6 +151,7 @@ func (s roomSettings) migrateSpamlistSettings() {
// ContentOptions converts room display settings to content options
func (s roomSettings) ContentOptions() *email.ContentOptions {
return &email.ContentOptions{
CC: !s.NoCC(),
HTML: !s.NoHTML(),
Sender: !s.NoSender(),
Recipient: !s.NoRecipient(),