mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-10 20:56:51 +00:00
Notify about new mailbox
This commit is contained in:
@ -6,6 +6,7 @@ Changelog [format](http://keepachangelog.com/en/1.0.0/)
|
|||||||
|
|
||||||
### Added
|
### Added
|
||||||
* IMAP extension MOVE with UIDPLUS support
|
* IMAP extension MOVE with UIDPLUS support
|
||||||
|
* IMAP mailbox info update when new mailbox is created
|
||||||
* IMAP extension Unselect
|
* IMAP extension Unselect
|
||||||
* More logs about event loop activity
|
* More logs about event loop activity
|
||||||
|
|
||||||
|
|||||||
@ -78,6 +78,7 @@ func (storeAddress *Address) createOrUpdateMailboxEvent(label *pmapi.Label) erro
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
storeAddress.mailboxes[label.ID] = mailbox
|
storeAddress.mailboxes[label.ID] = mailbox
|
||||||
|
mailbox.store.imapMailboxCreated(storeAddress.address, mailbox.labelName)
|
||||||
} else {
|
} else {
|
||||||
mailbox.labelName = prefix + label.Name
|
mailbox.labelName = prefix + label.Name
|
||||||
mailbox.color = label.Color
|
mailbox.color = label.Color
|
||||||
|
|||||||
@ -76,6 +76,20 @@ func (store *Store) imapDeleteMessage(address, mailboxName string, sequenceNumbe
|
|||||||
store.imapSendUpdate(update)
|
store.imapSendUpdate(update)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (store *Store) imapMailboxCreated(address, mailboxName string) {
|
||||||
|
store.log.WithFields(logrus.Fields{
|
||||||
|
"address": address,
|
||||||
|
}).Trace("IDLE mailbox info")
|
||||||
|
update := new(imapBackend.MailboxInfoUpdate)
|
||||||
|
update.Update = imapBackend.NewUpdate(address, "")
|
||||||
|
update.MailboxInfo = &imap.MailboxInfo{
|
||||||
|
Attributes: []string{imap.NoInferiorsAttr},
|
||||||
|
Delimiter: PathDelimiter,
|
||||||
|
Name: mailboxName,
|
||||||
|
}
|
||||||
|
store.imapSendUpdate(update)
|
||||||
|
}
|
||||||
|
|
||||||
func (store *Store) imapMailboxStatus(address, mailboxName string, total, unread, unreadSeqNum uint) {
|
func (store *Store) imapMailboxStatus(address, mailboxName string, total, unread, unreadSeqNum uint) {
|
||||||
store.log.WithFields(logrus.Fields{
|
store.log.WithFields(logrus.Fields{
|
||||||
"address": address,
|
"address": address,
|
||||||
|
|||||||
Reference in New Issue
Block a user