From a6107b2b5e84db104641545bd72c7d871678261f Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Mon, 2 Mar 2009 19:45:44 +0000 Subject: core.stanza_router: Don't bounce errors to iq type=result/error --- core/stanza_router.lua | 4 ++-- 1 file 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 -- cgit v1.2.3