Mercurial > prosody-hg
comparison plugins/mod_component.lua @ 11034:233196135048
mod_component: Reply with a different error when not connected
The wait, service-unavailable is overloaded by XEP-0045 to mean that the
room has reached the maximum number of users. See #1495.
Bouncing errors for components is tricky since there is no way to tell
that it comes from the server hosting the component, not from the other
end of the component connection.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Mon, 13 Apr 2020 02:46:03 +0200 |
| parents | 29575fe64860 |
| children | ba1143ddae9b |
comparison
equal
deleted
inserted
replaced
| 11033:cb5555443852 | 11034:233196135048 |
|---|---|
| 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", "service-unavailable", "Component unavailable", module.host)); | 135 event.origin.send(st.error_reply(stanza, "wait", "remote-server-timeout", "Component unavailable", module.host)); |
| 136 end | 136 end |
| 137 end | 137 end |
| 138 return true; | 138 return true; |
| 139 end | 139 end |
| 140 | 140 |
