unoptimal refactoring

This commit is contained in:
Aine
2022-08-23 19:23:15 +03:00
parent 609e19c133
commit 81abe8c785
6 changed files with 92 additions and 116 deletions

View File

@@ -98,11 +98,11 @@ func (b *Bot) Send(ctx context.Context, from, to, subject, plaintext, html strin
settings, err := b.getSettings(ctx, roomID)
if err != nil {
return err
b.Error(ctx, roomID, "cannot get settings: %v", err)
}
var text strings.Builder
if !settings.HideSenderAddress {
if !settings.NoSender {
text.WriteString("From: ")
text.WriteString(from)
text.WriteString("\n\n")