Merge 0.10->trunk
[prosody.git] / core / stanza_router.lua
index 4f529129d91ce121f261f696d554db17e2004acc..8e86b16f58d4c7af99c9bd1a0c81723e855168b6 100644 (file)
@@ -63,7 +63,7 @@ function core_process_stanza(origin, stanza)
                end
                if name == "iq" then
                        if not stanza.attr.id then stanza.attr.id = ""; end -- COMPAT Jabiru doesn't send the id attribute on roster requests
-                       if not iq_types[st_type] or (st_type ~= "result" and #stanza.tags ~= 1) then
+                       if not iq_types[st_type] or ((st_type == "set" or st_type == "get") and (#stanza.tags ~= 1)) then
                                origin.send(st.error_reply(stanza, "modify", "bad-request", "Invalid IQ type or incorrect number of children"));
                                return;
                        end