const ucl_object_t *val, *elt;
struct rspamd_rcl_section *subsection;
struct rspamd_rcl_symbol_data sd;
+ const gchar *description = NULL;
g_assert (key != NULL);
}
}
+ elt = ucl_object_lookup (obj, "description");
+ if (elt) {
+ description = ucl_object_tostring (elt);
+
+ gr->description = rspamd_mempool_strdup (cfg->cfg_pool,
+ description);
+ }
+
sd.gr = gr;
sd.cfg = cfg;
ucl_object_insert_key (obj, ucl_object_fromdouble (score),
"score", 0, false);
+ if (gr->description) {
+ ucl_object_insert_key (obj, ucl_object_fromstring (gr->description),
+ "description", 0, false);
+ }
+
return obj;
}