diff options
author | Ben Fiedler <git@services.bfiedler.ch> | 2020-04-24 22:31:39 +0200 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2020-05-01 11:10:08 -0400 |
commit | 05fa79eb8efa02e39962c08231ec0e40cafe0020 (patch) | |
tree | 90cc60bbc6ec1829021abbb219ba9e49d7b653a2 /commands/msg/pipe.go | |
parent | b650bb30a2d3ebd527c66dc7f7b229ca238fe297 (diff) | |
download | aerc-05fa79eb8efa02e39962c08231ec0e40cafe0020.tar.gz |
store.FetchFull: Change callback type to expose entire message
This is a prerequisite for allowing the FetchFull message to return both
the message content and the message headers.
Diffstat (limited to 'commands/msg/pipe.go')
-rw-r--r-- | commands/msg/pipe.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/commands/msg/pipe.go b/commands/msg/pipe.go index 9fbc3acc..44b0067d 100644 --- a/commands/msg/pipe.go +++ b/commands/msg/pipe.go @@ -9,6 +9,7 @@ import ( "git.sr.ht/~sircmpwn/aerc/commands" "git.sr.ht/~sircmpwn/aerc/widgets" + "git.sr.ht/~sircmpwn/aerc/worker/types" "git.sr.ht/~sircmpwn/getopt" "github.com/gdamore/tcell" @@ -115,11 +116,11 @@ func (Pipe) Execute(aerc *widgets.Aerc, args []string) error { if err != nil { return err } - store.FetchFull([]uint32{msg.Uid}, func(reader io.Reader) { + store.FetchFull([]uint32{msg.Uid}, func(fm *types.FullMessage) { if background { - doExec(reader) + doExec(fm.Content.Reader) } else { - doTerm(reader, fmt.Sprintf( + doTerm(fm.Content.Reader, fmt.Sprintf( "%s <%s", cmd[0], msg.Envelope.Subject)) } }) |