Software /
code /
prosody
Changeset
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 |
parents | 11034:233196135048 |
children | 11036:79e410cd7f6e |
files | plugins/mod_component.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
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;