GODT-1740: Opt-out All Mail visibility in settings file.
This commit is contained in:
@ -31,6 +31,7 @@ type cacheProvider interface {
|
||||
type bridger interface {
|
||||
GetUser(query string) (bridgeUser, error)
|
||||
HasError(err error) bool
|
||||
IsAllMailVisible() bool
|
||||
}
|
||||
|
||||
type bridgeUser interface {
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user