mod_muc_rai: Ignore presence to host that doesn't contain the <rai/> element
authorMatthew Wild <mwild1@gmail.com>
Wed, 19 Aug 2020 15:14:00 +0100
changeset 4078 4b84beb48ba0
parent 4077 f6542e51b741
child 4079 4841cf3fded5
mod_muc_rai: Ignore presence to host that doesn't contain the <rai/> element
mod_muc_rai/mod_muc_rai.lua
--- a/mod_muc_rai/mod_muc_rai.lua	Tue Aug 18 18:56:47 2020 +0200
+++ b/mod_muc_rai/mod_muc_rai.lua	Wed Aug 19 15:14:00 2020 +0100
@@ -195,6 +195,10 @@
 		return true;
 	end
 
+	if not stanza:get_child("rai", xmlns_rai) then
+		return; -- Ignore, no <rai/> tag
+	end
+
 	local rooms_with_activity, err = subscribe_all_rooms(user_jid);
 
 	if not rooms_with_activity then