chore: bump go-imap dependency and remove go-imap-specialuse dependency

This commit is contained in:
James Houlahan
2020-12-28 14:38:54 +01:00
parent 8fe042218c
commit 175f0977f9
12 changed files with 22 additions and 26 deletions

View File

@ -23,7 +23,6 @@ import (
"github.com/ProtonMail/proton-bridge/pkg/message"
"github.com/ProtonMail/proton-bridge/pkg/pmapi"
"github.com/emersion/go-imap"
specialuse "github.com/emersion/go-imap-specialuse"
"github.com/sirupsen/logrus"
)
@ -86,17 +85,17 @@ func (im *imapMailbox) getFlags() []string {
}
switch im.storeMailbox.LabelID() {
case pmapi.SentLabel:
flags = append(flags, specialuse.Sent)
flags = append(flags, imap.SentAttr)
case pmapi.TrashLabel:
flags = append(flags, specialuse.Trash)
flags = append(flags, imap.TrashAttr)
case pmapi.SpamLabel:
flags = append(flags, specialuse.Junk)
flags = append(flags, imap.JunkAttr)
case pmapi.ArchiveLabel:
flags = append(flags, specialuse.Archive)
flags = append(flags, imap.ArchiveAttr)
case pmapi.AllMailLabel:
flags = append(flags, specialuse.All)
flags = append(flags, imap.AllAttr)
case pmapi.DraftLabel:
flags = append(flags, specialuse.Drafts)
flags = append(flags, imap.DraftsAttr)
}
return flags

View File

@ -36,7 +36,6 @@ import (
imapidle "github.com/emersion/go-imap-idle"
imapmove "github.com/emersion/go-imap-move"
imapquota "github.com/emersion/go-imap-quota"
imapspecialuse "github.com/emersion/go-imap-specialuse"
imapunselect "github.com/emersion/go-imap-unselect"
imapserver "github.com/emersion/go-imap/server"
"github.com/emersion/go-sasl"
@ -82,7 +81,6 @@ func NewIMAPServer(debugClient, debugServer bool, port int, tls *tls.Config, ima
s.Enable(
imapidle.NewExtension(),
imapmove.NewExtension(),
imapspecialuse.NewExtension(),
id.NewExtension(serverID, imapBackend.bridge),
imapquota.NewExtension(),
imapappendlimit.NewExtension(),