Bläddra i källkod

[Fix] Always set the unlearn flag when relearning

Treat relearning from ham to spam the same as relearning from spam to ham. `res` is only set to true if the mail is already learned.
pull/4930/head
aduernberger 3 veckor sedan
förälder
incheckning
20f6d7103e
Inget konto är kopplat till bidragsgivarens mejladress
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1
    1
      src/libstat/learn_cache/redis_cache.cxx

+ 1
- 1
src/libstat/learn_cache/redis_cache.cxx Visa fil

@@ -170,7 +170,7 @@ rspamd_stat_cache_checked(lua_State *L)
(task->flags & RSPAMD_TASK_FLAG_LEARN_SPAM) ? "spam" : "ham");
task->flags |= RSPAMD_TASK_FLAG_ALREADY_LEARNED;
}
else if (val != 0) {
else {
/* Unlearn flag */
task->flags |= RSPAMD_TASK_FLAG_UNLEARN;
}

Laddar…
Avbryt
Spara