FetchBodyParts: decode source in the workers
Previously the workers returned a mixture of decoded / encoded parts. This lead to a whole bunch of issues. This commit changes the msgviewer and the commands to assume parts to already be decoded
This commit is contained in:
parent
19dfc49481
commit
9096049f75
8 changed files with 29 additions and 117 deletions
|
@ -36,7 +36,7 @@ func (Open) Execute(aerc *widgets.Aerc, args []string) error {
|
|||
mv := aerc.SelectedTab().(*widgets.MessageViewer)
|
||||
p := mv.SelectedMessagePart()
|
||||
|
||||
p.Store.FetchBodyPart(p.Msg.Uid, p.Index, func(reader io.Reader) {
|
||||
p.Store.FetchBodyPart(p.Msg.Uid, p.Msg.BodyStructure, p.Index, func(reader io.Reader) {
|
||||
// email parts are encoded as 7bit (plaintext), quoted-printable, or base64
|
||||
|
||||
if strings.EqualFold(p.Part.Encoding, "base64") {
|
||||
|
|
|
@ -60,7 +60,7 @@ func (Save) Execute(aerc *widgets.Aerc, args []string) error {
|
|||
mv := aerc.SelectedTab().(*widgets.MessageViewer)
|
||||
p := mv.SelectedMessagePart()
|
||||
|
||||
p.Store.FetchBodyPart(p.Msg.Uid, p.Index, func(reader io.Reader) {
|
||||
p.Store.FetchBodyPart(p.Msg.Uid, p.Msg.BodyStructure, p.Index, func(reader io.Reader) {
|
||||
// email parts are encoded as 7bit (plaintext), quoted-printable, or base64
|
||||
|
||||
if strings.EqualFold(p.Part.Encoding, "base64") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue