aboutsummaryrefslogtreecommitdiffstats
path: root/lib/messageview.go
diff options
context:
space:
mode:
authorBen Fiedler <git@services.bfiedler.ch>2020-04-24 22:31:39 +0200
committerDrew DeVault <sir@cmpwn.com>2020-05-01 11:10:08 -0400
commit05fa79eb8efa02e39962c08231ec0e40cafe0020 (patch)
tree90cc60bbc6ec1829021abbb219ba9e49d7b653a2 /lib/messageview.go
parentb650bb30a2d3ebd527c66dc7f7b229ca238fe297 (diff)
downloadaerc-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 'lib/messageview.go')
-rw-r--r--lib/messageview.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/messageview.go b/lib/messageview.go
index be3b90ff..3bf133aa 100644
--- a/lib/messageview.go
+++ b/lib/messageview.go
@@ -12,6 +12,7 @@ import (
"git.sr.ht/~sircmpwn/aerc/models"
"git.sr.ht/~sircmpwn/aerc/worker/lib"
+ "git.sr.ht/~sircmpwn/aerc/worker/types"
)
// This is an abstraction for viewing a message with semi-transparent PGP
@@ -65,7 +66,8 @@ func NewMessageStoreView(messageInfo *models.MessageInfo,
nil, nil, messageInfo.BodyStructure}
if usePGP(messageInfo.BodyStructure) {
- store.FetchFull([]uint32{messageInfo.Uid}, func(reader io.Reader) {
+ store.FetchFull([]uint32{messageInfo.Uid}, func(fm *types.FullMessage) {
+ reader := fm.Content.Reader
pgpReader, err := pgpmail.Read(reader, Keyring, decryptKeys, nil)
if err != nil {
panic(err)