aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/msglist.go
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2022-12-20 20:29:12 +0100
committerRobin Jarry <robin@jarry.cc>2023-01-04 22:57:31 +0100
commit37e9a924894db7e5f232e82066155a60827c339b (patch)
tree48deeeea33113bbc9e6fcbcb8973a3ba1d62a06d /widgets/msglist.go
parentc56027b2e69ec198e41394e5cf906273d80baf79 (diff)
downloadaerc-37e9a924894db7e5f232e82066155a60827c339b.tar.gz
config: parse account from and aliases once
Instead of accepting any garbage for these configuration fields, parse them when parsing accounts.conf and store mail.Address objects. Reuse these objects everywhere. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Tim Culverhouse <tim@timculverhouse.com>
Diffstat (limited to 'widgets/msglist.go')
-rw-r--r--widgets/msglist.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/widgets/msglist.go b/widgets/msglist.go
index c260da1c..839453f2 100644
--- a/widgets/msglist.go
+++ b/widgets/msglist.go
@@ -91,7 +91,7 @@ func (ml *MessageList) Draw(ctx *ui.Context) {
createBaseCtx := func(uid uint32, row int) format.Ctx {
return format.Ctx{
- FromAddress: acct.acct.From,
+ FromAddress: format.AddressForHumans(acct.acct.From),
AccountName: acct.Name(),
MsgInfo: store.Messages[uid],
MsgNum: row,