diff options
author | 2025-03-20 12:48:45 +0100 | |
---|---|---|
committer | 2025-03-20 12:48:45 +0100 | |
commit | 4389e052e2ca926b014d8bfd40fde219adfe81e1 (patch) | |
tree | 79ea240e1a315f631f1a6764529093bbc9adf5b5 | |
parent | b5988d34aedbe44d5d634679593aacc060290cb8 (diff) | |
download | alps-4389e052e2ca926b014d8bfd40fde219adfe81e1.tar.gz alps-4389e052e2ca926b014d8bfd40fde219adfe81e1.tar.bz2 alps-4389e052e2ca926b014d8bfd40fde219adfe81e1.zip |
Upgrade go-imap
-rw-r--r-- | go.mod | 2 | ||||
-rw-r--r-- | go.sum | 4 | ||||
-rw-r--r-- | plugins/base/imap.go | 10 |
3 files changed, 5 insertions, 11 deletions
@@ -7,7 +7,7 @@ require ( github.com/chris-ramon/douceur v0.2.0 github.com/dustin/go-humanize v1.0.1 github.com/emersion/go-ical v0.0.0-20240127095438-fc1c9d8fb2b6 - github.com/emersion/go-imap/v2 v2.0.0-beta.4 + github.com/emersion/go-imap/v2 v2.0.0-beta.5 github.com/emersion/go-message v0.18.1 github.com/emersion/go-sasl v0.0.0-20241020182733-b788ff22d5a6 github.com/emersion/go-smtp v0.21.3 @@ -10,8 +10,8 @@ github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkp github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/emersion/go-ical v0.0.0-20240127095438-fc1c9d8fb2b6 h1:kHoSgklT8weIDl6R6xFpBJ5IioRdBU1v2X2aCZRVCcM= github.com/emersion/go-ical v0.0.0-20240127095438-fc1c9d8fb2b6/go.mod h1:BEksegNspIkjCQfmzWgsgbu6KdeJ/4LwUZs7DMBzjzw= -github.com/emersion/go-imap/v2 v2.0.0-beta.4 h1:BS7+kUVhe/jfuFWgn8li0AbCKBIDoNvqJWsRJppltcc= -github.com/emersion/go-imap/v2 v2.0.0-beta.4/go.mod h1:BZTFHsS1hmgBkFlHqbxGLXk2hnRqTItUgwjSSCsYNAk= +github.com/emersion/go-imap/v2 v2.0.0-beta.5 h1:H3858DNmBuXyMK1++YrQIRdpKE1MwBc+ywBtg3n+0wA= +github.com/emersion/go-imap/v2 v2.0.0-beta.5/go.mod h1:BZTFHsS1hmgBkFlHqbxGLXk2hnRqTItUgwjSSCsYNAk= github.com/emersion/go-message v0.18.1 h1:tfTxIoXFSFRwWaZsgnqS1DSZuGpYGzSmCZD8SK3QA2E= github.com/emersion/go-message v0.18.1/go.mod h1:XpJyL70LwRvq2a8rVbHXikPgKj8+aI0kGdHlg16ibYA= github.com/emersion/go-sasl v0.0.0-20200509203442-7bfe0ed36a21/go.mod h1:iL2twTeMvZnrg54ZoPDNfJaJaqy0xIQFuBdrLsmspwQ= diff --git a/plugins/base/imap.go b/plugins/base/imap.go index ec4947d..4b125d9 100644 --- a/plugins/base/imap.go +++ b/plugins/base/imap.go @@ -584,14 +584,8 @@ func getMessagePart(conn *imapclient.Client, mboxName string, uid imap.UID, part } msg := msgs[0] - var headerBuf, bodyBuf []byte - for item, b := range msg.BodySection { - if item.Specifier == headerItem.Specifier { - headerBuf = b - } else if item.Specifier == bodyItem.Specifier { - bodyBuf = b - } - } + headerBuf := msg.FindBodySection(headerItem) + bodyBuf := msg.FindBodySection(bodyItem) if headerBuf == nil || bodyBuf == nil { return nil, nil, fmt.Errorf("server didn't return header and body") } |