Add ability to hide sender's email address (hide-sender-address setting)

The configuration setting is called `Hide*` instead of `Show*`, because
it's backward compatible with existing configuration settings.

This is useful for when you setup an email forwarding inbox and you're
always sending to it through the same email address. In that case, you
don't need to see the email address in each Matrix message.

In the future, another similar `bool` setting (`hide-subject`) will land,
which controls whether the email's subject is shown in the final message
or not. That setting can make use of most of the same setup (all of
`handleBooleanConfigurationKey`).
This commit is contained in:
Slavi Pantaleev
2022-08-23 18:18:06 +03:00
parent b8cb8196c2
commit 9f3aa3dd68
4 changed files with 124 additions and 9 deletions

View File

@@ -14,8 +14,9 @@ var migrations = []string{}
// settings of a room
type settings struct {
Mailbox string
Owner id.UserID
Mailbox string
Owner id.UserID
HideSenderAddress bool
}
// Allowed checks if change is allowed