mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-18 16:17:03 +00:00
Other: Do not list \Deleted flag for All Mail
This commit is contained in:
@ -333,6 +333,8 @@ func newSystemMailboxCreatedUpdate(labelID imap.MailboxID, labelName string) *im
|
|||||||
}
|
}
|
||||||
|
|
||||||
attrs := imap.NewFlagSet(imap.AttrNoInferiors)
|
attrs := imap.NewFlagSet(imap.AttrNoInferiors)
|
||||||
|
permanentFlags := defaultPermanentFlags
|
||||||
|
flags := defaultFlags
|
||||||
|
|
||||||
switch labelID {
|
switch labelID {
|
||||||
case proton.TrashLabel:
|
case proton.TrashLabel:
|
||||||
@ -343,6 +345,8 @@ func newSystemMailboxCreatedUpdate(labelID imap.MailboxID, labelName string) *im
|
|||||||
|
|
||||||
case proton.AllMailLabel:
|
case proton.AllMailLabel:
|
||||||
attrs = attrs.Add(imap.AttrAll)
|
attrs = attrs.Add(imap.AttrAll)
|
||||||
|
flags = imap.NewFlagSet(imap.FlagSeen, imap.FlagFlagged)
|
||||||
|
permanentFlags = imap.NewFlagSet(imap.FlagSeen, imap.FlagFlagged)
|
||||||
|
|
||||||
case proton.ArchiveLabel:
|
case proton.ArchiveLabel:
|
||||||
attrs = attrs.Add(imap.AttrArchive)
|
attrs = attrs.Add(imap.AttrArchive)
|
||||||
@ -360,8 +364,8 @@ func newSystemMailboxCreatedUpdate(labelID imap.MailboxID, labelName string) *im
|
|||||||
return imap.NewMailboxCreated(imap.Mailbox{
|
return imap.NewMailboxCreated(imap.Mailbox{
|
||||||
ID: labelID,
|
ID: labelID,
|
||||||
Name: []string{labelName},
|
Name: []string{labelName},
|
||||||
Flags: defaultFlags,
|
Flags: flags,
|
||||||
PermanentFlags: defaultPermanentFlags,
|
PermanentFlags: permanentFlags,
|
||||||
Attributes: attrs,
|
Attributes: attrs,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user