mod_muc_block_pm: Don't respond to error stanzas
authorJC Brand <jc@opkode.com>
Wed, 20 May 2020 11:11:11 +0200
changeset 4031 291a45919988
parent 4030 e3964f876b5d
child 4032 a0db4a0e66f1
mod_muc_block_pm: Don't respond to error stanzas
mod_muc_block_pm/mod_muc_block_pm.lua
--- a/mod_muc_block_pm/mod_muc_block_pm.lua	Tue May 05 21:52:14 2020 +0200
+++ b/mod_muc_block_pm/mod_muc_block_pm.lua	Wed May 20 11:11:11 2020 +0200
@@ -11,6 +11,9 @@
 
 module:hook("message/full", function(event)
 	local stanza, origin = event.stanza, event.origin;
+	if stanza.attr.type == "error" then
+		return
+	end
 	local to, from = stanza.attr.to, stanza.attr.from;
 	local room = get_room_from_jid(bare_jid(to));
 	local to_occupant = room and room._occupants[to];