GODT-1740: Opt-out All Mail visibility in settings file.

This commit is contained in:
Jakub
2022-07-28 10:52:40 +02:00
parent 252ca9a5f9
commit 8b39ea4acb
9 changed files with 100 additions and 13 deletions

View File

@ -128,6 +128,10 @@ func (iu *imapUser) ListMailboxes(showOnlySubcribed bool) ([]goIMAPBackend.Mailb
mailboxes := []goIMAPBackend.Mailbox{}
for _, storeMailbox := range iu.storeAddress.ListMailboxes() {
if storeMailbox.LabelID() == pmapi.AllMailLabel && !iu.backend.bridge.IsAllMailVisible() {
continue
}
if showOnlySubcribed && !iu.isSubscribed(storeMailbox.LabelID()) {
continue
}