# HG changeset patch # User Kim Alvefur # Date 1577872744 -3600 # Node ID c0caee8f54bbe509a26e29bd6ab5e3ec5a16fd4d # Parent 683b06c0348fb21ddd22c278ce8a285df22542bb mod_rest: Ensure identical id attribute for error replies diff -r 683b06c0348f -r c0caee8f54bb mod_rest/mod_rest.lua --- a/mod_rest/mod_rest.lua Wed Jan 01 07:59:18 2020 +0100 +++ b/mod_rest/mod_rest.lua Wed Jan 01 10:59:04 2020 +0100 @@ -176,7 +176,7 @@ module:log("warn", "REST callback responded with the wrong stanza type, got %s but expected %s", parsed.name, stanza.name); else parsed.attr.to, parsed.attr.from = stanza.attr.from, stanza.attr.to; - if parsed.name == "iq" then + if parsed.name == "iq" or parsed.attr.type == "error" then parsed.attr.id = stanza.attr.id; end reply = parsed;