aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-04-13 02:49:19 +0200
committerKim Alvefur <zash@zash.se>2020-04-13 02:49:19 +0200
commitaeaad491d454d15c215cfc4eeb587f85d6f23837 (patch)
tree671b1002193fad1cad53b50fbc69fa16820f41a2 /plugins
parent2f67c339a3a06a759fe504a2158113e826369e27 (diff)
downloadprosody-aeaad491d454d15c215cfc4eeb587f85d6f23837.tar.gz
prosody-aeaad491d454d15c215cfc4eeb587f85d6f23837.zip
mod_component: Return extended error condition when not connected
This might be something to write a XEP about.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_component.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_component.lua b/plugins/mod_component.lua
index 2189aceb..d06df71c 100644
--- a/plugins/mod_component.lua
+++ b/plugins/mod_component.lua
@@ -132,7 +132,8 @@ function module.add_host(module)
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;