when moving message to mailbox with special-use flag "Junk", mark the message as junk too, for retraining

i had been using the AutomaticJunkFlags option, so hadn't noticed the special use flag wasn't used.
This commit is contained in:
Mechiel Lukkien
2023-09-21 15:19:11 +02:00
parent 79774c15ec
commit 2e16d8025d
5 changed files with 13 additions and 8 deletions

View File

@ -848,7 +848,7 @@ func (Webmail) MessageMove(ctx context.Context, messageIDs []int64, mailboxID in
m.UID = mbDst.UIDNext
m.ModSeq = modseq
mbDst.UIDNext++
m.JunkFlagsForMailbox(mbDst.Name, conf)
m.JunkFlagsForMailbox(mbDst, conf)
err = tx.Update(&m)
xcheckf(ctx, err, "updating moved message in database")