mod_rest: Stanzas of type error don't need a reply
authorKim Alvefur <zash@zash.se>
Thu, 02 Jan 2020 09:57:49 +0100
changeset 3828 a0b8ec44a36b
parent 3827 31b1797a78e1
child 3829 802087d3155a
mod_rest: Stanzas of type error don't need a reply
mod_rest/mod_rest.lua
--- a/mod_rest/mod_rest.lua	Thu Jan 02 09:30:47 2020 +0100
+++ b/mod_rest/mod_rest.lua	Thu Jan 02 09:57:49 2020 +0100
@@ -182,6 +182,10 @@
 		local reply_needed = stanza.name == "iq";
 		local receipt;
 
+		if stanza.attr.type == "error" then
+			reply_needed = false;
+		end
+
 		if stanza.name == "message" and stanza.attr.id and stanza:get_child("urn:xmpp:receipts", "request") then
 			reply_needed = true;
 			receipt = st.stanza("received", { xmlns = "urn:xmpp:receipts", id = stanza.id });