aboutsummaryrefslogtreecommitdiffstats
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
commite2f121eccb01e2c99f9cff6bd31427993f7d6164 (patch)
tree2654144b0ba8757167cce7975a7a49bf18640222
parent2c54183cfc1599a11af1a20bd8051bd042fa13f9 (diff)
downloadprosody-e2f121eccb01e2c99f9cff6bd31427993f7d6164.tar.gz
prosody-e2f121eccb01e2c99f9cff6bd31427993f7d6164.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.
-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