summaryrefslogtreecommitdiffstats
path: root/src/lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-03-24 09:52:16 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-03-24 09:52:16 +0000
commita9f5845edaf3f1293df3a5ecc222fb5b10bf016a (patch)
tree542122e8d50ec9f1db3a43ec0126abdff0f513ab /src/lua
parent7021ddcc38a0f05b2bf69849f645a848e06be1e2 (diff)
downloadrspamd-a9f5845edaf3f1293df3a5ecc222fb5b10bf016a.tar.gz
rspamd-a9f5845edaf3f1293df3a5ecc222fb5b10bf016a.zip
[Minor] Remove all get_api_version calls
Diffstat (limited to 'src/lua')
-rw-r--r--src/lua/lua_task.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c
index 711708335..43b6b281e 100644
--- a/src/lua/lua_task.c
+++ b/src/lua/lua_task.c
@@ -31,13 +31,11 @@
* and add the corresponding symbols to the scan's results.
@example
rspamd_config.DATE_IN_PAST = function(task)
- if rspamd_config:get_api_version() >= 5 then
local dm = task:get_date{format = 'message', gmt = true}
local dt = task:get_date{format = 'connect', gmt = true}
- -- A day
- if dt - dm > 86400 then
- return true
- end
+ -- A day
+ if dt - dm > 86400 then
+ return true
end
return false