Do not explicitly unlabel folders during move

This commit is contained in:
Michal Horejsek
2021-01-08 08:39:18 +01:00
parent 9193205834
commit 6c96643d12
3 changed files with 13 additions and 1 deletions

View File

@ -249,7 +249,10 @@ func (im *imapMailbox) labelMessages(uid bool, seqSet *imap.SeqSet, targetLabel
if err := targetStoreMailbox.LabelMessages(messageIDs); err != nil {
return err
}
if move {
// Folder cannot be unlabeled. Every message has to belong to exactly one folder.
// In case of labeling message to folder, the original one is implicitly unlabeled.
// Therefore, we have to unlabel explicitly only if the source mailbox is label.
if im.storeMailbox.IsLabel() && move {
if err := im.storeMailbox.UnlabelMessages(messageIDs); err != nil {
return err
}

View File

@ -62,6 +62,7 @@ type storeMailboxProvider interface {
Color() string
IsSystem() bool
IsFolder() bool
IsLabel() bool
UIDValidity() uint32
Rename(newName string) error

View File

@ -11,3 +11,11 @@ Changelog [format](http://keepachangelog.com/en/1.0.0/)
### Changed
### Fixed
* GODT-979 Fix panic when trying to parse a multipart/alternative section that has no child sections.
### Changed
* GODT-389 Prefer `From` header instead of `MAIL FROM` address.
* GODT-898 Only set ContentID for inline attachments.
* GODT-773 Replace `INTERNALDATE` older than birthday of RFC822 by birthday of RFC822 to not crash Apple Mail.
* GODT-927 Avoid to call API with empty label name.
* GODT-732 Fix usage of fontawesome
* GODT-885 Do not explicitly unlabel folders during move to match behaviour of other clients.