From 923994105c47cf4d8a9df88d4afb5e7a1d0354eb Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 13 Apr 2020 02:49:19 +0200 Subject: mod_component: Return extended error condition when not connected This might be something to write a XEP about. --- plugins/mod_component.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3