# HG changeset patch # User Jonas Schäfer # Date 1780728031 -7200 # Node ID 228859ea47816d821bdef54a2bdb1c054465d2d8 # Parent 15a7749c7acbe9ea9314c4de97288668d6578bc0 mod_muc_members_json: do not automatically unban entities This would otherwise serve to evade temporary bans. diff -r 15a7749c7acb -r 228859ea4781 mod_muc_members_json/mod_muc_members_json.lua --- a/mod_muc_members_json/mod_muc_members_json.lua Sun May 24 20:07:30 2026 +0100 +++ b/mod_muc_members_json/mod_muc_members_json.lua Sat Jun 06 08:40:31 2026 +0200 @@ -117,12 +117,16 @@ local expected_affiliation = (is_owner and "owner") or (is_admin and "admin") or "member"; local affiliation = muc:get_affiliation(member_jid); if affiliation ~= expected_affiliation then - if not dry_run then - muc:set_affiliation(true, member_jid, expected_affiliation, "imported membership"); - muc:set_affiliation_data(member_jid, "source", module.name); - module:log("info", "Set affiliation of %s in %s, %s -> %s", member_jid, muc_jid, affiliation, expected_affiliation); + if affiliation == "outcast" then + module:log("debug", "Not updating affiliation of %s in %s, because they are currently outcast", member_jid, muc_jid); else - module:log("info", "DRY RUN: Would set affiliation of %s in %s, %s -> %s", member_jid, muc_jid, affiliation, expected_affiliation); + if not dry_run then + muc:set_affiliation(true, member_jid, expected_affiliation, "imported membership"); + muc:set_affiliation_data(member_jid, "source", module.name); + module:log("info", "Set affiliation of %s in %s, %s -> %s", member_jid, muc_jid, affiliation, expected_affiliation); + else + module:log("info", "DRY RUN: Would set affiliation of %s in %s, %s -> %s", member_jid, muc_jid, affiliation, expected_affiliation); + end end end if not dry_run then