Software /
code /
prosody
Changeset
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 |
parents | 11350:3287dbdde33e |
children | 11352:e10567199f02 |
files | plugins/adhoc/adhoc.lib.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
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