Comparison

core/stanza_router.lua @ 7450:3ae19750cd46

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Mon, 30 May 2016 13:30:53 +0200
parent 7448:34678ce8a6ac
child 7648:d91ef1e6afc2
comparison
equal deleted inserted replaced
7447:843fe134453e 7450:3ae19750cd46
60 local name, st_type = stanza.name, stanza.attr.type; 60 local name, st_type = stanza.name, stanza.attr.type;
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
66 if not iq_types[st_type] or ((st_type == "set" or st_type == "get") and (#stanza.tags ~= 1)) then 65 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")); 66 origin.send(st.error_reply(stanza, "modify", "bad-request", "Invalid IQ type or incorrect number of children"));
68 return; 67 return;
69 end 68 end
70 end 69 end