Compare commits

..

No commits in common. "51439a54c282b1714d7edf4b5a113536a4356959" and "a0a3ab8d0e8a0b90dc3469b4d95c018d6de109d0" have entirely different histories.

View File

@ -45,8 +45,8 @@ def config_list(
"anonymous_list": True, "anonymous_list": True,
"archive_policy": "private", "archive_policy": "private",
"member_roster_visibility": "moderators", "member_roster_visibility": "moderators",
"subscription_policy": "confirm_then_moderate", "subscribe_policy": "confirm_then_moderate",
"unsubscription_policy": "confirm", "unsubscribe_policy": "confirm",
"default_member_action": "hold", "default_member_action": "hold",
"default_nonmember_action": "discard", "default_nonmember_action": "discard",
"advertised": False, "advertised": False,
@ -68,7 +68,7 @@ def diff_roster(
expected_members_dict = dict( expected_members_dict = dict(
list(reversed(email.utils.parseaddr(member))) for member in expected_members list(reversed(email.utils.parseaddr(member))) for member in expected_members
) )
existing_members_dict = {str(member.address): member for member in existing_members} existing_members_dict = {member.address: member for member in existing_members}
members_to_add = { members_to_add = {
k: expected_members_dict[k] k: expected_members_dict[k]
for k in set(expected_members_dict) - set(existing_members_dict) for k in set(expected_members_dict) - set(existing_members_dict)
@ -112,7 +112,7 @@ def sync_moderators(
for address, display_name in members_to_add.items(): for address, display_name in members_to_add.items():
print(f"Adding '{display_name} <{address}>' as moderator to list {list}") print(f"Adding '{display_name} <{address}>' as moderator to list {list}")
if not dry_run: if not dry_run:
list.add_moderator(address, display_name) list.subscribe(address, display_name)
for member in members_to_remove: for member in members_to_remove:
print(f"Removing {member} as moderator from list {list}") print(f"Removing {member} as moderator from list {list}")