Software /
code /
prosody
Comparison
core/stanza_router.lua @ 7448:34678ce8a6ac
core.stanza_router: Remove compatibility with Jabiru not including id attribute (originally added in 9b352c8a32e6)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 30 May 2016 13:29:43 +0200 |
parent | 6663:d3023dd07cb6 |
child | 7648:d91ef1e6afc2 |
comparison
equal
deleted
inserted
replaced
7446:0db72fac2faa | 7448:34678ce8a6ac |
---|---|
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 |