exports.rspamd_count_metatokens = rspamd_count_metatokens
exports.count_metatokens = rspamd_count_metatokens
+exports.version = 1 -- MUST be increased on each change of metatokens
exports.add_metafunction = function(tbl)
local ret, err = meta_schema(tbl)
for _,set in pairs(known_ids) do
set.symbols = lua_util.keys(fun.filter(function(_, v) return v end, set.symbols))
table.sort(set.symbols)
-
- -- Create digest from sorted symbols
- local cr = require "rspamd_cryptobox_hash"
- local h = cr.create()
- for _,sym in ipairs(set.symbols) do
- h:update(sym)
- end
- set.digest = h:base32()
+ set.digest = lua_util.table_digest(set.symbols)
end
post_init_performed = true
return known_ids[id]
end
+
exports.settings_by_id = settings_by_id
exports.all_settings = known_ids
exports.all_symbols = all_symbols