Comparison

plugins/mod_component.lua @ 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
parent 11034:233196135048
child 11240:0f7ecc9a4560
comparison
equal deleted inserted replaced
11034:233196135048 11035:ba1143ddae9b
130 end 130 end
131 end 131 end
132 end 132 end
133 module:log("warn", "Component not connected, bouncing error for: %s", stanza:top_tag()); 133 module:log("warn", "Component not connected, bouncing error for: %s", stanza:top_tag());
134 if stanza.attr.type ~= "error" and stanza.attr.type ~= "result" then 134 if stanza.attr.type ~= "error" and stanza.attr.type ~= "result" then
135 event.origin.send(st.error_reply(stanza, "wait", "remote-server-timeout", "Component unavailable", module.host)); 135 event.origin.send(st.error_reply(stanza, "wait", "remote-server-timeout", "Component unavailable", module.host)
136 :tag("not-connected", { xmlns = "xmpp:prosody.im/protocol/component" }));
136 end 137 end
137 end 138 end
138 return true; 139 return true;
139 end 140 end
140 141