From 8711e2bedce3958748e3a614e132834db56efe51 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 31 Jan 2021 21:11:55 +0100 Subject: adhoc.lib: Tweak to allow using util.error objects Since util.stanza supports util.error objects via duck-typing and adhoc errors look enough like util.error objects, they should able to pass as such. This will allow converting adhoc commands to use util.error. --- plugins/adhoc/adhoc.lib.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/adhoc/adhoc.lib.lua') diff --git a/plugins/adhoc/adhoc.lib.lua b/plugins/adhoc/adhoc.lib.lua index 0c61a636..4cf6911d 100644 --- a/plugins/adhoc/adhoc.lib.lua +++ b/plugins/adhoc/adhoc.lib.lua @@ -51,7 +51,7 @@ function _M.handle_cmd(command, origin, stanza) cmdreply = command:cmdtag("canceled", sessionid); elseif data.status == "error" then states[sessionid] = nil; - local reply = st.error_reply(stanza, data.error.type, data.error.condition, data.error.message); + local reply = st.error_reply(stanza, data.error); origin.send(reply); return true; else -- cgit v1.2.3