From aba1a6521dc518f31b463d3420b411827ea18378 Mon Sep 17 00:00:00 2001 From: Aine Date: Thu, 17 Nov 2022 23:17:23 +0200 Subject: [PATCH] compact replies, closes #50 --- utils/email.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/utils/email.go b/utils/email.go index 8fe523b..66071e5 100644 --- a/utils/email.go +++ b/utils/email.go @@ -104,16 +104,16 @@ func (e *Email) Mailbox(incoming bool) string { func (e *Email) Content(threadID id.EventID, options *ContentOptions) *event.Content { var text strings.Builder if options.Sender { - text.WriteString("From: ") text.WriteString(e.From) - text.WriteString("\n") } if options.Recipient { - text.WriteString("To: ") + text.WriteString(" ➡️ ") text.WriteString(e.To) - text.WriteString("\n") } - if options.Subject { + if options.Sender || options.Recipient { + text.WriteString("\n\n") + } + if options.Subject && threadID == "" { text.WriteString("# ") text.WriteString(e.Subject) text.WriteString("\n\n")