Software /
code /
prosody
Diff
plugins/mod_component.lua @ 11035:ba1143ddae9b
mod_component: Return extended error condition when not connected
This might be something to write a XEP about.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 13 Apr 2020 02:49:19 +0200 |
parent | 11034:233196135048 |
child | 11240:0f7ecc9a4560 |
line wrap: on
line diff
--- a/plugins/mod_component.lua Mon Apr 13 02:46:03 2020 +0200 +++ b/plugins/mod_component.lua Mon Apr 13 02:49:19 2020 +0200 @@ -132,7 +132,8 @@ end module:log("warn", "Component not connected, bouncing error for: %s", stanza:top_tag()); if stanza.attr.type ~= "error" and stanza.attr.type ~= "result" then - event.origin.send(st.error_reply(stanza, "wait", "remote-server-timeout", "Component unavailable", module.host)); + event.origin.send(st.error_reply(stanza, "wait", "remote-server-timeout", "Component unavailable", module.host) + :tag("not-connected", { xmlns = "xmpp:prosody.im/protocol/component" })); end end return true;