diff options
author | Kim Alvefur <zash@zash.se> | 2021-01-31 21:11:55 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-01-31 21:11:55 +0100 |
commit | 8711e2bedce3958748e3a614e132834db56efe51 (patch) | |
tree | 2654144b0ba8757167cce7975a7a49bf18640222 /plugins | |
parent | 5d9802727bef83c44a7d66133bedaf3ee77a155d (diff) | |
download | prosody-8711e2bedce3958748e3a614e132834db56efe51.tar.gz prosody-8711e2bedce3958748e3a614e132834db56efe51.zip |
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.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/adhoc/adhoc.lib.lua | 2 |
1 files changed, 1 insertions, 1 deletions
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 |