equal
deleted
inserted
replaced
436 local function reply(orig) |
436 local function reply(orig) |
437 if not is_stanza(orig) then |
437 if not is_stanza(orig) then |
438 error("bad argument to reply: expected stanza, got "..type(orig)); |
438 error("bad argument to reply: expected stanza, got "..type(orig)); |
439 end |
439 end |
440 return new_stanza(orig.name, |
440 return new_stanza(orig.name, |
441 orig.attr and { |
441 { |
442 to = orig.attr.from, |
442 to = orig.attr.from, |
443 from = orig.attr.to, |
443 from = orig.attr.to, |
444 id = orig.attr.id, |
444 id = orig.attr.id, |
445 type = ((orig.name == "iq" and "result") or orig.attr.type) |
445 type = ((orig.name == "iq" and "result") or orig.attr.type) |
446 }); |
446 }); |