changeset 10449 | f53c03ab4357 |
parent 10448 | 4eab1f5a4f3b |
child 10450 | 5c2d1b13537c |
--- a/util/stanza.lua Mon Nov 25 20:52:01 2019 +0100 +++ b/util/stanza.lua Mon Nov 25 20:52:03 2019 +0100 @@ -450,6 +450,8 @@ local function error_reply(orig, error_type, condition, error_message) if not is_stanza(orig) then error("bad argument to error_reply: expected stanza, got "..type(orig)); + elseif orig.attr.type == "error" then + error("bad argument to error_reply: got stanza of type error which must not be replied to"); end local t = reply(orig); t.attr.type = "error";