# HG changeset patch # User Kim Alvefur # Date 1586738959 -7200 # Node ID ba1143ddae9b44a59b29deeaf1a716b7447e306e # Parent 23319613504898bec385daa1a7c72d1deea50f89 mod_component: Return extended error condition when not connected This might be something to write a XEP about. diff -r 233196135048 -r ba1143ddae9b plugins/mod_component.lua --- 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;