aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-11-28 13:29:44 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-11-28 13:29:44 +0000
commitb2324423b1c5b0b9fa0a7cf173cc4ae903da018f (patch)
tree315c6218d66c14db312ef25f9b7f5b7a717f266c /src/lua
parent17d100afebda176346bb7f929507a9eab49b6678 (diff)
downloadrspamd-b2324423b1c5b0b9fa0a7cf173cc4ae903da018f.tar.gz
rspamd-b2324423b1c5b0b9fa0a7cf173cc4ae903da018f.zip
[Minor] Allow to import any Lua object to message
Diffstat (limited to 'src/lua')
-rw-r--r--src/lua/lua_task.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c
index cb725aadf..0ea1367d5 100644
--- a/src/lua/lua_task.c
+++ b/src/lua/lua_task.c
@@ -2111,7 +2111,7 @@ lua_task_append_message (lua_State * L)
{
LUA_TRACE_POINT;
struct rspamd_task *task = lua_check_task (L, 1);
- const gchar *message = luaL_checkstring (L, 2), *category;
+ const gchar *category;
if (task != NULL) {
if (lua_type (L, 3) == LUA_TSTRING) {
@@ -2122,7 +2122,7 @@ lua_task_append_message (lua_State * L)
}
ucl_object_insert_key (task->messages,
- ucl_object_fromstring_common (message, 0, UCL_STRING_RAW),
+ ucl_object_lua_import (L, 2),
category, 0,
true);
}