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.
--- a/plugins/adhoc/adhoc.lib.lua Sun Jan 31 20:38:40 2021 +0100
+++ b/plugins/adhoc/adhoc.lib.lua Sun Jan 31 21:11:55 2021 +0100
@@ -51,7 +51,7 @@
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