diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-08-03 19:49:08 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-08-03 19:49:08 +0100 |
commit | a42862af34d601105b906ef498c1077bf67af24c (patch) | |
tree | 9f2767819c04708e4cfe020bc322d2c75c5fb80e /src | |
parent | e0a0714d1d71443e9e61b27fc638186c6434bac9 (diff) | |
download | rspamd-a42862af34d601105b906ef498c1077bf67af24c.tar.gz rspamd-a42862af34d601105b906ef498c1077bf67af24c.zip |
[Minor] Pass all multimap config fields to the `set_metric_symbol` method
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/lua/multimap.lua | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua index 303f97d0e..742f96666 100644 --- a/src/plugins/lua/multimap.lua +++ b/src/plugins/lua/multimap.lua @@ -1124,20 +1124,11 @@ if opts and type(opts) == 'table' then end if rule['score'] then -- Register metric symbol - local description = 'multimap symbol' - local group = N - if rule['description'] then - description = rule['description'] - end - if rule['group'] then - group = rule['group'] - end - rspamd_config:set_metric_symbol({ - name = rule['symbol'], - score = rule['score'], - description = description, - group = group - }) + rule.name = rule.symbol + rule.description = rule.description or 'multimap symbol' + rule.group = rule.group or N + + rspamd_config:set_metric_symbol(rule) end end, fun.filter(function(r) return not r['prefilter'] end, rules)) |