task->result = mres;
task->pre_result.action = act;
task->pre_result.str = "Gtube pattern";
- ucl_object_insert_key (task->messages,
- ucl_object_fromstring ("Gtube pattern"), "smtp_message", 0,
- false);
+
+ if (ucl_object_lookup (task->messages, "smtp_message") == NULL) {
+ ucl_object_replace_key (task->messages,
+ ucl_object_fromstring ("Gtube pattern"), "smtp_message", 0,
+ false);
+ }
+
rspamd_task_insert_result (task, GTUBE_SYMBOL, 0, NULL);
return;
action_str = rspamd_mempool_strdup (task->task_pool,
luaL_checkstring (L, 3));
task->pre_result.str = action_str;
- ucl_object_insert_key (task->messages,
+ ucl_object_replace_key (task->messages,
ucl_object_fromstring (action_str), "smtp_message", 0,
false);
}