aboutsummaryrefslogtreecommitdiffstats
path: root/worker/imap/imap.go
diff options
context:
space:
mode:
authorReto Brunner <reto@labrat.space>2020-11-10 19:57:09 +0100
committerReto Brunner <reto@labrat.space>2020-11-14 15:40:13 +0100
commitfc9ccc30008e564c1dea23b3bfe480ca5a10c070 (patch)
tree80acc77569557d73cbd073def0dabd6472653b5d /worker/imap/imap.go
parentfb67d1f5a3f6fe875d74581aff59c79817a7b9f4 (diff)
downloadaerc-fc9ccc30008e564c1dea23b3bfe480ca5a10c070.tar.gz
remove models.Address in favor of go-message Address
We made a new type out of go-message/mail.Address without any real reason. This suddenly made it necessary to convert from one to the other without actually having any benefit whatsoever. This commit gets rid of the additional type
Diffstat (limited to 'worker/imap/imap.go')
-rw-r--r--worker/imap/imap.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/worker/imap/imap.go b/worker/imap/imap.go
index aa1854d6..e296e9b5 100644
--- a/worker/imap/imap.go
+++ b/worker/imap/imap.go
@@ -5,6 +5,7 @@ import (
"git.sr.ht/~sircmpwn/aerc/models"
"github.com/emersion/go-message/charset"
+ "github.com/emersion/go-message/mail"
)
func init() {
@@ -59,10 +60,10 @@ func translateEnvelope(e *imap.Envelope) *models.Envelope {
}
}
-func translateAddresses(addrs []*imap.Address) []*models.Address {
- var converted []*models.Address
+func translateAddresses(addrs []*imap.Address) []*mail.Address {
+ var converted []*mail.Address
for _, addr := range addrs {
- converted = append(converted, &models.Address{
+ converted = append(converted, &mail.Address{
Name: addr.PersonalName,
Address: addr.Address(),
})