core/stanza_router.lua
changeset 6561 461217c45a18
parent 6402 e3de64f7c44d
child 6562 0ef7ca5276a1
equal deleted inserted replaced
6526:63d3126b75f1 6561:461217c45a18
    61 		if st_type == "error" and #stanza.tags == 0 then
    61 		if st_type == "error" and #stanza.tags == 0 then
    62 			return handle_unhandled_stanza(origin.host, origin, stanza);
    62 			return handle_unhandled_stanza(origin.host, origin, stanza);
    63 		end
    63 		end
    64 		if name == "iq" then
    64 		if name == "iq" then
    65 			if not stanza.attr.id then stanza.attr.id = ""; end -- COMPAT Jabiru doesn't send the id attribute on roster requests
    65 			if not stanza.attr.id then stanza.attr.id = ""; end -- COMPAT Jabiru doesn't send the id attribute on roster requests
    66 			if not iq_types[st_type] or (st_type ~= "result" and #stanza.tags ~= 1) then
    66 			if not iq_types[st_type] or ((st_type == "set" or st_type == "get") and (#stanza.tags ~= 1)) then
    67 				origin.send(st.error_reply(stanza, "modify", "bad-request", "Invalid IQ type or incorrect number of children"));
    67 				origin.send(st.error_reply(stanza, "modify", "bad-request", "Invalid IQ type or incorrect number of children"));
    68 				return;
    68 				return;
    69 			end
    69 			end
    70 		end
    70 		end
    71 
    71