about summary refs log tree commit diff stats
path: root/commands
diff options
context:
space:
mode:
authorReto Brunner <reto@labrat.space>2020-08-19 12:01:45 +0200
committerReto Brunner <reto@labrat.space>2020-08-20 19:18:57 +0200
commitc84630714405a1e93766a6a6c023801302a3ea66 (patch)
tree156e9f45c6847a123f677594c8aff3a82322bce8 /commands
parentfe1cabb077cf6c6cb3de122b3f5532acbeba8c85 (diff)
downloadaerc-c84630714405a1e93766a6a6c023801302a3ea66.tar.gz
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.
Diffstat (limited to 'commands')
-rw-r--r--commands/msg/forward.go3
1 files changed, 2 insertions, 1 deletions
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
 		}