summaryrefslogtreecommitdiffstats
path: root/src/libmime/scan_result.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libmime/scan_result.c')
-rw-r--r--src/libmime/scan_result.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/libmime/scan_result.c b/src/libmime/scan_result.c
index 428a2da71..6e6b30826 100644
--- a/src/libmime/scan_result.c
+++ b/src/libmime/scan_result.c
@@ -247,8 +247,16 @@ insert_metric_result (struct rspamd_task *task,
}
if (task->settings) {
- mobj = task->settings;
gdouble corr;
+ mobj = ucl_object_lookup (task->settings, "scores");
+
+ if (!mobj) {
+ /* Legacy */
+ mobj = task->settings;
+ }
+ else {
+ msg_debug_metric ("found scores in the settings");
+ }
sobj = ucl_object_lookup (mobj, symbol);
if (sobj != NULL && ucl_object_todouble_safe (sobj, &corr)) {