mod_muc_members_json/mod_muc_members_json.lua
changeset 5661 80abda15a1e9
parent 5591 dd4df71166ea
--- a/mod_muc_members_json/mod_muc_members_json.lua	Tue Sep 19 13:22:00 2023 +0200
+++ b/mod_muc_members_json/mod_muc_members_json.lua	Tue Sep 19 14:55:56 2023 +0200
@@ -80,7 +80,7 @@
 					end
 					-- Remove affiliation from folk who weren't in the source data but previously were
 					for jid, aff, data in muc:each_affiliation() do
-						if not jids[jid] and data.source == module.name then
+						if not jids[jid] and data and data.source == module.name then
 							muc:set_affiliation(true, jid, "none", "imported membership lost");
 						end
 					end