diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-04-11 22:23:49 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-04-11 22:23:49 +0100 |
commit | d3497ece79c81c9a2509407a50472856b8c72d0e (patch) | |
tree | 65075062457140991db0dba476e70605aa6f1c2a | |
parent | 0ddf0a3232f175e8d160b54549bb4a1ff1afe63d (diff) | |
download | prosody-d3497ece79c81c9a2509407a50472856b8c72d0e.tar.gz prosody-d3497ece79c81c9a2509407a50472856b8c72d0e.zip |
componentmanager: Improve default component stanza handler
-rw-r--r-- | core/componentmanager.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/componentmanager.lua b/core/componentmanager.lua index 1da8cd6f..6727c82e 100644 --- a/core/componentmanager.lua +++ b/core/componentmanager.lua @@ -14,6 +14,7 @@ local configmanager = require "core.configmanager"; local eventmanager = require "core.eventmanager"; local modulemanager = require "core.modulemanager"; local jid_split = require "util.jid".split; +local st = require "util.stanza"; local hosts = hosts; local pairs, type, tostring = pairs, type, tostring; @@ -35,7 +36,10 @@ end); module "componentmanager" local function default_component_handler(origin, stanza) - origin.send(st.error_reply(stanza, "wait", "service-unavailable", "Component unavailable")); + log("warn", "Stanza being handled by default component, bouncing error"); + if stanza.attr.type ~= "error" then + origin.send(st.error_reply(stanza, "wait", "service-unavailable", "Component unavailable")); + end end |