commit 701a711: [Minor] Rename method name

Vsevolod Stakhov vsevolod at highsecure.ru
Wed Jul 24 12:42:06 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-07-24 13:40:40 +0100
URL: https://github.com/rspamd/rspamd/commit/701a711049ee01373bc3862cc441fc3065c8dbc2 (HEAD -> master)

[Minor] Rename method name

---
 conf/statistic.conf        | 2 +-
 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


More information about the Commits mailing list