aboutsummaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
Diffstat (limited to 'commands')
-rw-r--r--commands/msg/unsubscribe.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/commands/msg/unsubscribe.go b/commands/msg/unsubscribe.go
index a489ec58..3a69ff98 100644
--- a/commands/msg/unsubscribe.go
+++ b/commands/msg/unsubscribe.go
@@ -44,7 +44,11 @@ func (Unsubscribe) Execute(aerc *widgets.Aerc, args []string) error {
if !headers.Has("list-unsubscribe") {
return errors.New("No List-Unsubscribe header found")
}
- methods := parseUnsubscribeMethods(headers.Get("list-unsubscribe"))
+ text, err := headers.Text("list-unsubscribe")
+ if err != nil {
+ return err
+ }
+ methods := parseUnsubscribeMethods(text)
aerc.Logger().Printf("found %d unsubscribe methods", len(methods))
for _, method := range methods {
aerc.Logger().Printf("trying to unsubscribe using %v", method)