From c84630714405a1e93766a6a6c023801302a3ea66 Mon Sep 17 00:00:00 2001 From: Reto Brunner Date: Wed, 19 Aug 2020 12:01:45 +0200 Subject: base models.Address on the mail.Address type This allows us to hook into the std libs implementation of parsing related stuff. For this, we need to get rid of the distinction between a mailbox and a host to just a single "address" field. However this is already the common case. All but one users immediately concatenated the mbox/domain to a single address. So this in effects makes it simpler for most cases and we simply do the transformation in the special case. --- commands/msg/forward.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'commands/msg/forward.go') diff --git a/commands/msg/forward.go b/commands/msg/forward.go index 3ff0194..0c6b0e0 100644 --- a/commands/msg/forward.go +++ b/commands/msg/forward.go @@ -11,6 +11,7 @@ import ( "strings" "git.sr.ht/~sircmpwn/aerc/lib" + "git.sr.ht/~sircmpwn/aerc/lib/format" "git.sr.ht/~sircmpwn/aerc/models" "git.sr.ht/~sircmpwn/aerc/widgets" "git.sr.ht/~sircmpwn/aerc/worker/types" @@ -77,7 +78,7 @@ func (forward) Execute(aerc *widgets.Aerc, args []string) error { addTab := func() (*widgets.Composer, error) { if template != "" { - original.From = models.FormatAddresses(msg.Envelope.From) + original.From = format.FormatAddresses(msg.Envelope.From) original.Date = msg.Envelope.Date } -- cgit v1.2.3