Diff

plugins/adhoc/adhoc.lib.lua @ 11351:6b541d3c4c1b

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.
author Kim Alvefur <zash@zash.se>
date Sun, 31 Jan 2021 21:11:55 +0100
parent 10565:421b2f8369fd
child 12429:16a49f04d507
line wrap: on
line diff
--- 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