diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-07-24 13:40:40 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-07-24 13:40:40 +0100 |
commit | 701a711049ee01373bc3862cc441fc3065c8dbc2 (patch) | |
tree | 75624d86d48e4f3a9f34e5f19a412d830ee54400 | |
parent | ebf85df69089ca407d280df4cfaeb865e1e455f1 (diff) | |
download | rspamd-701a711049ee01373bc3862cc441fc3065c8dbc2.tar.gz rspamd-701a711049ee01373bc3862cc441fc3065c8dbc2.zip |
[Minor] Rename method name
-rw-r--r-- | conf/statistic.conf | 2 | ||||
-rw-r--r-- | lualib/lua_bayes_learn.lua | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/conf/statistic.conf b/conf/statistic.conf index bb76853ca..1e78c73cd 100644 --- a/conf/statistic.conf +++ b/conf/statistic.conf @@ -41,7 +41,7 @@ classifier "bayes" { symbol = "BAYES_SPAM"; spam = true; } - learn_condition = "return require("lua_bayes_learn").autolearn" + learn_condition = "return require("lua_bayes_learn").can_learn" .include(try=true; priority=1) "$LOCAL_CONFDIR/local.d/classifier-bayes.conf" .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/classifier-bayes.conf" diff --git a/lualib/lua_bayes_learn.lua b/lualib/lua_bayes_learn.lua index 70cbb96c0..7df52a2ef 100644 --- a/lualib/lua_bayes_learn.lua +++ b/lualib/lua_bayes_learn.lua @@ -18,7 +18,7 @@ limitations under the License. local exports = {} -exports.autolearn = function(task, is_spam, is_unlearn) +exports.can_learn = function(task, is_spam, is_unlearn) local learn_type = task:get_request_header('Learn-Type') if not (learn_type and tostring(learn_type) == 'bulk') then |