diff options
author | Sebastien Binet <s@sbinet.org> | 2023-12-14 16:20:37 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-12-30 15:42:09 +0100 |
commit | f92935c9c395ce4ee38fdc734c7ba93133a369e8 (patch) | |
tree | 2d2d649bc4cb22c219f7adeb398d271698327bc8 /commands/msg/reply.go | |
parent | de3255182263fb8203e761f483a17533c6a38a05 (diff) | |
download | aerc-f92935c9c395ce4ee38fdc734c7ba93133a369e8.tar.gz |
commands/msg: adapt quote-reply to honor viewer::alternatives
modify quote-reply to quote the message part corresponding to the first
MIME type matching the list in viewer::alternatives.
Signed-off-by: Sebastien Binet <s@sbinet.org>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'commands/msg/reply.go')
-rw-r--r-- | commands/msg/reply.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/commands/msg/reply.go b/commands/msg/reply.go index 699c75fb..4b3e7c81 100644 --- a/commands/msg/reply.go +++ b/commands/msg/reply.go @@ -222,7 +222,14 @@ func (r reply) Execute(args []string) error { return nil } - part := lib.FindPlaintext(msg.BodyStructure, nil) + var part []int + for _, mime := range config.Viewer.Alternatives { + part = lib.FindMIMEPart(mime, msg.BodyStructure, nil) + if part != nil { + break + } + } + if part == nil { // mkey... let's get the first thing that isn't a container // if that's still nil it's either not a multipart msg (ok) or |