Changeset

3824:a0b8ec44a36b

mod_rest: Stanzas of type error don't need a reply
author Kim Alvefur <zash@zash.se>
date Thu, 02 Jan 2020 09:57:49 +0100
parents 3823:31b1797a78e1
children 3825:802087d3155a
files mod_rest/mod_rest.lua
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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 });