Final touches of go-imap v1 implementation

create-reload-action
Michal Horejsek 6 years ago
parent 1998d92432
commit e43bd231ed
  1. 3
      Changelog.md
  2. 7
      internal/imap/mailbox.go
  3. 1
      internal/store/change.go
  4. 2
      test/features/imap/message/search.feature

@ -12,6 +12,9 @@ Changelog [format](http://keepachangelog.com/en/1.0.0/)
### Changed
* 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-165 Optimization of RebuildMailboxes
* 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()
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 {
status.Messages = uint32(dbTotal)
status.Unseen = uint32(dbUnread)

@ -79,6 +79,7 @@ func (store *Store) imapDeleteMessage(address, mailboxName string, sequenceNumbe
func (store *Store) imapMailboxCreated(address, mailboxName string) {
store.log.WithFields(logrus.Fields{
"address": address,
"mailbox": mailboxName,
}).Trace("IDLE mailbox info")
update := new(imapBackend.MailboxInfoUpdate)
update.Update = imapBackend.NewUpdate(address, "")

@ -1,6 +1,8 @@
Feature: IMAP search messages
Background:
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"
| from | to | cc | subject | read | starred | body |
| john.doe@email.com | user@pm.me | | foo | false | false | hello |

Loading…
Cancel
Save