mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-17 23:56:56 +00:00
GODT-1754: Add logs for unilateral updates and SEARCH.
This commit is contained in:
@ -53,6 +53,9 @@ type imapUser struct {
|
||||
// not cause huge slow down as EXPUNGE is implicitly called also after
|
||||
// UNSELECT, CLOSE, or LOGOUT.
|
||||
appendExpungeLock sync.Mutex
|
||||
|
||||
addressID string // cached value for logs to avoid lock
|
||||
mailboxIDs map[string]string // cached values for logs to avoid lock
|
||||
}
|
||||
|
||||
// newIMAPUser returns struct implementing go-imap/user interface.
|
||||
@ -84,6 +87,8 @@ func newIMAPUser(
|
||||
storeAddress: storeAddress,
|
||||
|
||||
currentAddressLowercase: strings.ToLower(address),
|
||||
addressID: addressID,
|
||||
mailboxIDs: map[string]string{},
|
||||
}, err
|
||||
}
|
||||
|
||||
@ -128,6 +133,8 @@ func (iu *imapUser) ListMailboxes(showOnlySubcribed bool) ([]goIMAPBackend.Mailb
|
||||
|
||||
mailboxes := []goIMAPBackend.Mailbox{}
|
||||
for _, storeMailbox := range iu.storeAddress.ListMailboxes() {
|
||||
iu.mailboxIDs[storeMailbox.Name()] = storeMailbox.LabelID()
|
||||
|
||||
if storeMailbox.LabelID() == pmapi.AllMailLabel && !iu.backend.bridge.IsAllMailVisible() {
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user