From b76bf1b7eecfc885798385960b04b92cb62d75f0 Mon Sep 17 00:00:00 2001 From: Bence Ferdinandy Date: Thu, 4 Jan 2024 21:02:19 +0100 Subject: templates: move signature from compose to templates Currently, when composing a new message, everything is read from the template files, except the signature, which is added directly in the compose code. Add a new template variable {{.Signature}}, by moving the logic of reading signature from command or file from compose to templates. Update the various default template files to preserve the original placement of signatures. Users using the default templates should not notice the change. Users with custom compose templates will need to update their templates with {{.Signature}}. Changelog-changed: Signature placement is now controlled via the `{{.Signature}}` template variable and not hardcoded. Signed-off-by: Bence Ferdinandy Acked-by: Robin Jarry --- models/templates.go | 1 + 1 file changed, 1 insertion(+) (limited to 'models') diff --git a/models/templates.go b/models/templates.go index 77f6b787..a6a85371 100644 --- a/models/templates.go +++ b/models/templates.go @@ -59,6 +59,7 @@ type TemplateData interface { Style(string, string) string StyleSwitch(string, ...Case) string StyleMap([]string, ...Case) []string + Signature() string } type Case interface { -- cgit