res = FALSE;
}
+ else {
+ if (!!spam == !!st->stcf->is_spam) {
+ st->backend->inc_learns (task, bk_run, st_ctx);
+ }
+ else {
+ st->backend->dec_learns (task, bk_run, st_ctx);
+ }
+ }
}
}
continue;
}
- if (!task->flags & RSPAMD_TASK_FLAG_UNLEARN) {
- if (!!spam != !!st->stcf->is_spam) {
- /* If we are not unlearning, then do not touch another class */
- continue;
- }
-
- st->backend->inc_learns (task, bk_run, st_ctx);
- }
- else {
- if (!!spam == !!st->stcf->is_spam) {
- st->backend->inc_learns (task, bk_run, st_ctx);
- }
- else {
- st->backend->dec_learns (task, bk_run, st_ctx);
- }
- }
-
st->backend->finalize_learn (task, bk_run, st_ctx);
}
}