When retraining ham/spam messages, don't make existence of the messages optional.

If messages that should exist don't, that's a real error we don't want to hide.
Part of larger changes.
This commit is contained in:
Mechiel Lukkien
2025-03-01 10:48:36 +01:00
parent 3b731b7afe
commit 5ba51adb14
7 changed files with 39 additions and 33 deletions

View File

@ -283,7 +283,7 @@ func (c *conn) cmdxReplace(isUID bool, tag, cmd string, p *parser) {
// Undo any junk filter training for the old message.
om.Junk = false
om.Notjunk = false
err = c.account.RetrainMessages(context.TODO(), c.log, tx, []store.Message{om}, false)
err = c.account.RetrainMessages(context.TODO(), c.log, tx, []store.Message{om})
xcheckf(err, "untraining expunged messages")
// Mark old message expunged.