component.lua

changeset 282
52b971d9ebc3
parent 161
b177bcea2006
child 314
ee5fc3ee9150
equal deleted inserted replaced
279:7a0aa3d055f4 282:52b971d9ebc3
76 return true; 76 return true;
77 end 77 end
78 end); 78 end);
79 79
80 self:hook("stanza", function (stanza) 80 self:hook("stanza", function (stanza)
81 local ret;
81 if stanza.attr.xmlns == nil or stanza.attr.xmlns == "jabber:client" then 82 if stanza.attr.xmlns == nil or stanza.attr.xmlns == "jabber:client" then
82 if stanza.name == "iq" and (stanza.attr.type == "get" or stanza.attr.type == "set") then 83 if stanza.name == "iq" and (stanza.attr.type == "get" or stanza.attr.type == "set") then
83 local xmlns = stanza.tags[1] and stanza.tags[1].attr.xmlns; 84 local xmlns = stanza.tags[1] and stanza.tags[1].attr.xmlns;
84 if xmlns then 85 if xmlns then
85 ret = self:event("iq/"..xmlns, stanza); 86 ret = self:event("iq/"..xmlns, stanza);

mercurial