Browse Source

[Minor] Pass all multimap config fields to the `set_metric_symbol` method

tags/1.8.0
Vsevolod Stakhov 5 years ago
parent
commit
a42862af34
1 changed files with 5 additions and 14 deletions
  1. 5
    14
      src/plugins/lua/multimap.lua

+ 5
- 14
src/plugins/lua/multimap.lua View File

@@ -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))

Loading…
Cancel
Save