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

@@ -107,7 +107,11 @@ func (e *Email) Content(threadID id.EventID, options *ContentOptions) *event.Con
text.WriteString(" ➡️ ")
text.WriteString(e.To)
}
if options.Sender || options.Recipient {
if options.CC && e.CC != "" {
text.WriteString("\ncc: ")
text.WriteString(e.CC)
}
if options.Sender || options.Recipient || options.CC {
text.WriteString("\n\n")
}
if options.Subject && threadID == "" {

View File

@@ -10,6 +10,7 @@ type IncomingFilteringOptions interface {
// ContentOptions represents settings that specify how an email is to be converted to a Matrix message
type ContentOptions struct {
// On/Off
CC bool
Sender bool
Recipient bool
Subject bool