aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/adhoc
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-01-31 21:11:55 +0100
committerKim Alvefur <zash@zash.se>2021-01-31 21:11:55 +0100
commit8711e2bedce3958748e3a614e132834db56efe51 (patch)
tree2654144b0ba8757167cce7975a7a49bf18640222 /plugins/adhoc
parent5d9802727bef83c44a7d66133bedaf3ee77a155d (diff)
downloadprosody-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/adhoc')
-rw-r--r--plugins/adhoc/adhoc.lib.lua2
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