]> source.dussan.org Git - rspamd.git/commit
[Fix] Increase/decrease hash_key value for tokens depending on is_unlearn 4930/head
authoraduernberger <aduernberger@googlemail.com>
Thu, 18 Apr 2024 12:44:01 +0000 (14:44 +0200)
committerGitHub <noreply@github.com>
Thu, 18 Apr 2024 12:44:01 +0000 (14:44 +0200)
commit26f96b81fdf73a0bd4a663837ea4df496dcbbc14
tree69a14af2e0d43d5aa2385e0ece57dbcdf5c75928
parentccc1716bb546423aa9e1eaee19fb470c2ec2fa45
[Fix] Increase/decrease hash_key value for tokens depending on is_unlearn

When relearning a message, this script is called twice:

1. With `is_unlearn` true and the old `is_spam` value
2. With `is_unlearn` false and the new `is_spam` value

If `is_unlearn` is true, the code should not increase the value of the hash_key. Decreasing it ensures that it behaves like a fresh learn with the new is_spam value.
lualib/redis_scripts/bayes_learn.lua