diff options
author | Reto Brunner <reto@labrat.space> | 2020-08-19 12:01:45 +0200 |
---|---|---|
committer | Reto Brunner <reto@labrat.space> | 2020-08-20 19:18:57 +0200 |
commit | c84630714405a1e93766a6a6c023801302a3ea66 (patch) | |
tree | 156e9f45c6847a123f677594c8aff3a82322bce8 /worker/imap/imap.go | |
parent | fe1cabb077cf6c6cb3de122b3f5532acbeba8c85 (diff) | |
download | aerc-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 'worker/imap/imap.go')
-rw-r--r-- | worker/imap/imap.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/worker/imap/imap.go b/worker/imap/imap.go index 7afab026..aa1854d6 100644 --- a/worker/imap/imap.go +++ b/worker/imap/imap.go @@ -64,8 +64,7 @@ func translateAddresses(addrs []*imap.Address) []*models.Address { for _, addr := range addrs { converted = append(converted, &models.Address{ Name: addr.PersonalName, - Mailbox: addr.MailboxName, - Host: addr.HostName, + Address: addr.Address(), }) } return converted |