forked from Silverfish/proton-bridge
Final touches of go-imap v1 implementation
This commit is contained in:
@ -12,6 +12,9 @@ Changelog [format](http://keepachangelog.com/en/1.0.0/)
|
|||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
* GODT-162 User Agent does not contain bridge version, only client in format `client name/client version (os)`
|
* GODT-162 User Agent does not contain bridge version, only client in format `client name/client version (os)`
|
||||||
|
* GODT-258 Update go-imap to v1
|
||||||
|
* Fix UNSEEN to return sequence number of first unseen message and not count of unseen messages
|
||||||
|
* INBOX name is never quoted
|
||||||
* GODT-225 Do not send an EXISTS reposnse after EXPUNGE or when nothing changed (fixes rebuild of mailboxes in Outlook for Mac)
|
* GODT-225 Do not send an EXISTS reposnse after EXPUNGE or when nothing changed (fixes rebuild of mailboxes in Outlook for Mac)
|
||||||
* GODT-165 Optimization of RebuildMailboxes
|
* GODT-165 Optimization of RebuildMailboxes
|
||||||
* GODT-282 Completely delete old draft instead moving to trash when user updates draft
|
* GODT-282 Completely delete old draft instead moving to trash when user updates draft
|
||||||
|
|||||||
@ -126,7 +126,12 @@ func (im *imapMailbox) Status(items []imap.StatusItem) (*imap.MailboxStatus, err
|
|||||||
}
|
}
|
||||||
|
|
||||||
dbTotal, dbUnread, dbUnreadSeqNum, err := im.storeMailbox.GetCounts()
|
dbTotal, dbUnread, dbUnreadSeqNum, err := im.storeMailbox.GetCounts()
|
||||||
l.Debugln("DB: total", dbTotal, "unread", dbUnread, "unreadSeqNum", dbUnreadSeqNum, "err", err)
|
l.WithFields(logrus.Fields{
|
||||||
|
"total": dbTotal,
|
||||||
|
"unread": dbUnread,
|
||||||
|
"unreadSeqNum": dbUnreadSeqNum,
|
||||||
|
"err": err,
|
||||||
|
}).Debug("DB counts")
|
||||||
if err == nil {
|
if err == nil {
|
||||||
status.Messages = uint32(dbTotal)
|
status.Messages = uint32(dbTotal)
|
||||||
status.Unseen = uint32(dbUnread)
|
status.Unseen = uint32(dbUnread)
|
||||||
|
|||||||
@ -79,6 +79,7 @@ func (store *Store) imapDeleteMessage(address, mailboxName string, sequenceNumbe
|
|||||||
func (store *Store) imapMailboxCreated(address, mailboxName string) {
|
func (store *Store) imapMailboxCreated(address, mailboxName string) {
|
||||||
store.log.WithFields(logrus.Fields{
|
store.log.WithFields(logrus.Fields{
|
||||||
"address": address,
|
"address": address,
|
||||||
|
"mailbox": mailboxName,
|
||||||
}).Trace("IDLE mailbox info")
|
}).Trace("IDLE mailbox info")
|
||||||
update := new(imapBackend.MailboxInfoUpdate)
|
update := new(imapBackend.MailboxInfoUpdate)
|
||||||
update.Update = imapBackend.NewUpdate(address, "")
|
update.Update = imapBackend.NewUpdate(address, "")
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
Feature: IMAP search messages
|
Feature: IMAP search messages
|
||||||
Background:
|
Background:
|
||||||
Given there is connected user "user"
|
Given there is connected user "user"
|
||||||
|
# Messages are inserted in opposite way to keep increasing UID.
|
||||||
|
# Sequence numbers are then opposite than listed above.
|
||||||
Given there are messages in mailbox "INBOX" for "user"
|
Given there are messages in mailbox "INBOX" for "user"
|
||||||
| from | to | cc | subject | read | starred | body |
|
| from | to | cc | subject | read | starred | body |
|
||||||
| john.doe@email.com | user@pm.me | | foo | false | false | hello |
|
| john.doe@email.com | user@pm.me | | foo | false | false | hello |
|
||||||
|
|||||||
Reference in New Issue
Block a user