diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-07-31 18:20:52 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-07-31 18:20:52 +0100 |
commit | 01113a325556749e5cf1697dbb238b3307bcedb0 (patch) | |
tree | c9b92569aad99bbbb67fb225aa6e8451862d6732 /src/libmime | |
parent | fb3cfd2368694af6d4c1c15efd11f4798c015219 (diff) | |
download | rspamd-01113a325556749e5cf1697dbb238b3307bcedb0.tar.gz rspamd-01113a325556749e5cf1697dbb238b3307bcedb0.zip |
[Fix] Fix messages insertion
Diffstat (limited to 'src/libmime')
-rw-r--r-- | src/libmime/message.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/libmime/message.c b/src/libmime/message.c index 333748d16..7c0429c3c 100644 --- a/src/libmime/message.c +++ b/src/libmime/message.c @@ -835,9 +835,13 @@ rspamd_message_process_text_part (struct rspamd_task *task, 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; |