forked from Silverfish/proton-bridge
Other: Copy from All Mail allowed again.
Creates duplicate. Added test scenario.
This commit is contained in:
committed by
Jakub Cuth
parent
1250621a4d
commit
4d1ace5de7
@ -243,6 +243,10 @@ func (im *imapMailbox) moveMessages(uid bool, seqSet *imap.SeqSet, targetLabel s
|
||||
// Called from go-imap in goroutines - we need to handle panics for each function.
|
||||
defer im.panicHandler.HandlePanic()
|
||||
|
||||
// Moving from All Mail is not allowed.
|
||||
if im.storeMailbox.LabelID() == pmapi.AllMailLabel {
|
||||
return errors.New("move from All Mail is not allowed")
|
||||
}
|
||||
return im.labelMessages(uid, seqSet, targetLabel, true)
|
||||
}
|
||||
|
||||
@ -279,10 +283,6 @@ func (im *imapMailbox) labelMessages(uid bool, seqSet *imap.SeqSet, targetLabel
|
||||
}
|
||||
return errors.New("move from Sent to Inbox is not allowed")
|
||||
}
|
||||
// Moving from All Mail is not allowed.
|
||||
if im.storeMailbox.LabelID() == pmapi.AllMailLabel {
|
||||
return errors.New("move from All Mail is not allowed")
|
||||
}
|
||||
|
||||
deletedIDs := []string{}
|
||||
allDeletedIDs, err := im.storeMailbox.GetDeletedAPIIDs()
|
||||
|
||||
Reference in New Issue
Block a user