return FALSE;
}
- if (ucl_object_find_key (obj, "score") != NULL) {
+ if (ucl_object_find_any_key (obj, "score", "weight", NULL) != NULL) {
*sym_def->weight_ptr = sym_def->score;
}
rspamd_rcl_parse_struct_double,
G_STRUCT_OFFSET (struct rspamd_symbol_def, score),
0);
+ rspamd_rcl_add_default_handler (ssub,
+ "weight",
+ rspamd_rcl_parse_struct_double,
+ G_STRUCT_OFFSET (struct rspamd_symbol_def, score),
+ 0);
/* Actions part */
ssub = rspamd_rcl_add_section (&sub->subsections,
rspamd_rcl_parse_struct_double,
G_STRUCT_OFFSET (struct rspamd_symbol_def, score),
0);
+ rspamd_rcl_add_default_handler (sssub,
+ "weight",
+ rspamd_rcl_parse_struct_double,
+ G_STRUCT_OFFSET (struct rspamd_symbol_def, score),
+ 0);
/**
* Worker section