Diff

plugins/mod_component.lua @ 10716:29575fe64860

mod_component: Specify an error source for Component unavailable errors It is somewhat ambiguous where an error really comes from in the case of an external component. Setting by to the bare host at least distinguishes it from JIDs with a node- or resourcepart.
author Kim Alvefur <zash@zash.se>
date Sat, 11 Apr 2020 19:31:15 +0200
parent 10111:0f335815244f
child 11034:233196135048
line wrap: on
line diff
--- a/plugins/mod_component.lua	Sat Apr 11 17:59:39 2020 +0200
+++ b/plugins/mod_component.lua	Sat Apr 11 19:31:15 2020 +0200
@@ -132,7 +132,7 @@
 			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", "service-unavailable", "Component unavailable"));
+				event.origin.send(st.error_reply(stanza, "wait", "service-unavailable", "Component unavailable", module.host));
 			end
 		end
 		return true;