From 1d4eafb011f46966848d55f381160e846d0d50c8 Mon Sep 17 00:00:00 2001 From: Bence Ferdinandy Date: Mon, 1 Jul 2024 21:43:35 +0200 Subject: templates: add {{.AccountFrom}} template Add template variable to access the current account's From address. Implements: https://todo.sr.ht/~rjarry/aerc/150 Changelog-added: New `{{.AccountFrom}}` template variable. Signed-off-by: Bence Ferdinandy Tested-by: Koni Marti Acked-by: Robin Jarry --- config/templates.go | 1 + 1 file changed, 1 insertion(+) (limited to 'config') diff --git a/config/templates.go b/config/templates.go index 4000b1fc..14da731b 100644 --- a/config/templates.go +++ b/config/templates.go @@ -66,6 +66,7 @@ var ( func (d *dummyData) Account() string { return "work" } func (d *dummyData) AccountBackend() string { return "maildir" } +func (d *dummyData) AccountFrom() *mail.Address { return nil } func (d *dummyData) Signature() string { return "" } func (d *dummyData) Folder() string { return "INBOX" } func (d *dummyData) To() []*mail.Address { return []*mail.Address{&addr1} } -- cgit