aboutsummaryrefslogtreecommitdiffstats
path: root/core/stanza_router.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-03-02 19:45:44 +0000
committerMatthew Wild <mwild1@gmail.com>2009-03-02 19:45:44 +0000
commita6107b2b5e84db104641545bd72c7d871678261f (patch)
treeeff63e041d378a79272a184d0e4d5797c0762591 /core/stanza_router.lua
parent3db74ae200f8766a2bf5588cc20e5c4905e1030a (diff)
downloadprosody-a6107b2b5e84db104641545bd72c7d871678261f.tar.gz
prosody-a6107b2b5e84db104641545bd72c7d871678261f.zip
core.stanza_router: Don't bounce errors to iq type=result/error
Diffstat (limited to 'core/stanza_router.lua')
-rw-r--r--core/stanza_router.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/stanza_router.lua b/core/stanza_router.lua
index 29a4797b..23b7a37d 100644
--- a/core/stanza_router.lua
+++ b/core/stanza_router.lua
@@ -273,7 +273,7 @@ function core_route_stanza(origin, stanza)
end
-- TODO allow configuration of offline storage
-- TODO send error if not storing offline
- elseif stanza.name == "iq" then
+ elseif stanza.name == "iq" and (stanza.attr.type == "get" or stanza.attr.type == "set") then
origin.send(st.error_reply(stanza, "cancel", "service-unavailable"));
end
else -- user does not exist
@@ -284,7 +284,7 @@ function core_route_stanza(origin, stanza)
origin.send(st.presence({from = to_bare, to = from_bare, type = "unsubscribed"}));
end
-- else ignore
- else
+ elseif stanza.attr.type ~= "error" and (stanza.name ~= "iq" or stanza.attr.type ~= "result") then
origin.send(st.error_reply(stanza, "cancel", "service-unavailable"));
end
end