changeset 4027:291a45919988

mod_muc_block_pm: Don't respond to error stanzas
author JC Brand <jc@opkode.com>
date Wed, 20 May 2020 11:11:11 +0200
parents e3964f876b5d
children a0db4a0e66f1
files mod_muc_block_pm/mod_muc_block_pm.lua
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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];