- {% include 'snippets/privacy_select.html' with current=group.privacy %}
+ {% include 'snippets/privacy_select_no_followers.html' with current=group.privacy %}
diff --git a/bookwyrm/templates/notifications/item.html b/bookwyrm/templates/notifications/item.html
index 3ed43a96..e8e2dcb2 100644
--- a/bookwyrm/templates/notifications/item.html
+++ b/bookwyrm/templates/notifications/item.html
@@ -27,4 +27,10 @@
{% include 'notifications/items/leave.html' %}
{% elif notification.notification_type == 'REMOVE' %}
{% include 'notifications/items/remove.html' %}
+{% elif notification.notification_type == 'GROUP_PRIVACY' %}
+ {% include 'notifications/items/update.html' %}
+{% elif notification.notification_type == 'GROUP_NAME' %}
+ {% include 'notifications/items/update.html' %}
+{% elif notification.notification_type == 'GROUP_DESCRIPTION' %}
+ {% include 'notifications/items/update.html' %}
{% endif %}
diff --git a/bookwyrm/templates/notifications/items/join.html b/bookwyrm/templates/notifications/items/join.html
index 9c766806..93b35642 100644
--- a/bookwyrm/templates/notifications/items/join.html
+++ b/bookwyrm/templates/notifications/items/join.html
@@ -18,6 +18,3 @@ has joined your group "{{ group_name }}"
{% endblocktrans %}
{% endblock %}
-
-
-
diff --git a/bookwyrm/templates/notifications/items/update.html b/bookwyrm/templates/notifications/items/update.html
new file mode 100644
index 00000000..f963fd3a
--- /dev/null
+++ b/bookwyrm/templates/notifications/items/update.html
@@ -0,0 +1,28 @@
+{% extends 'notifications/items/item_layout.html' %}
+
+{% load i18n %}
+{% load utilities %}
+
+{% block primary_link %}{% spaceless %}
+ {{ notification.related_group.local_path }}
+{% endspaceless %}{% endblock %}
+
+{% block icon %}
+
+{% endblock %}
+
+{% block description %}
+ {% if notification.notification_type == 'GROUP_PRIVACY' %}
+ {% blocktrans with group_name=notification.related_group.name group_path=notification.related_group.local_path %}
+ has changed the privacy level for {{ group_name }}
+ {% endblocktrans %}
+ {% elif notification.notification_type == 'GROUP_NAME' %}
+ {% blocktrans with group_name=notification.related_group.name group_path=notification.related_group.local_path %}
+ has changed the name of {{ group_name }}
+ {% endblocktrans %}
+ {% else %}
+ {% blocktrans with group_name=notification.related_group.name group_path=notification.related_group.local_path %}
+ has changed the description of {{ group_name }}
+ {% endblocktrans %}
+ {% endif %}
+{% endblock %}
diff --git a/bookwyrm/templates/snippets/privacy_select_no_followers.html b/bookwyrm/templates/snippets/privacy_select_no_followers.html
new file mode 100644
index 00000000..2c601e7f
--- /dev/null
+++ b/bookwyrm/templates/snippets/privacy_select_no_followers.html
@@ -0,0 +1,21 @@
+{% load i18n %}
+{% load utilities %}
+
+ {% firstof privacy_uuid 0|uuid as uuid %}
+ {% if not no_label %}
+
+ {% endif %}
+ {% firstof current user.default_post_privacy "public" as privacy %}
+
+
+
diff --git a/bookwyrm/tests/models/test_group.py b/bookwyrm/tests/models/test_group.py
index 275fce19..33341d19 100644
--- a/bookwyrm/tests/models/test_group.py
+++ b/bookwyrm/tests/models/test_group.py
@@ -75,15 +75,6 @@ class Group(TestCase):
)
models.GroupMember.objects.create(group=self.public_group, user=self.capybara)
- def test_group_members_can_see_followers_only_groups(self, _):
- """follower-only group should not be excluded from group listings for group members viewing"""
-
- rat_groups = models.Group.privacy_filter(self.rat).all()
- badger_groups = models.Group.privacy_filter(self.badger).all()
-
- self.assertFalse(self.followers_only_group in rat_groups)
- self.assertTrue(self.followers_only_group in badger_groups)
-
def test_group_members_can_see_private_groups(self, _):
"""direct privacy group should not be excluded from group listings for group members viewing"""
diff --git a/bookwyrm/views/group.py b/bookwyrm/views/group.py
index 1c0a2848..9ee99bff 100644
--- a/bookwyrm/views/group.py
+++ b/bookwyrm/views/group.py
@@ -47,6 +47,31 @@ class Group(View):
if not form.is_valid():
return redirect("group", user_group.id)
user_group = form.save()
+
+ # let the other members know something about the group changed
+ memberships = models.GroupMember.objects.filter(group=user_group)
+ model = apps.get_model("bookwyrm.Notification", require_ready=True)
+ for field in form.changed_data:
+ notification_type = (
+ "GROUP_PRIVACY"
+ if field == "privacy"
+ else "GROUP_NAME"
+ if field == "name"
+ else "GROUP_DESCRIPTION"
+ if field == "description"
+ else None
+ )
+ if notification_type:
+ for membership in memberships:
+ member = membership.user
+ if member != request.user:
+ model.objects.create(
+ user=member,
+ related_user=request.user,
+ related_group=user_group,
+ notification_type=notification_type,
+ )
+
return redirect("group", user_group.id)