diff --git a/bookwyrm/activitypub/person.py b/bookwyrm/activitypub/person.py index f1298b92..dafd1910 100644 --- a/bookwyrm/activitypub/person.py +++ b/bookwyrm/activitypub/person.py @@ -30,5 +30,5 @@ class Person(ActivityObject): icon: Image = field(default_factory=lambda: {}) bookwyrmUser: bool = False manuallyApprovesFollowers: str = False - discoverable: str = True + discoverable: str = False type: str = "Person" diff --git a/bookwyrm/models/user.py b/bookwyrm/models/user.py index 84391e10..c2a74c63 100644 --- a/bookwyrm/models/user.py +++ b/bookwyrm/models/user.py @@ -103,7 +103,7 @@ class User(OrderedCollectionPageMixin, AbstractUser): last_active_date = models.DateTimeField(auto_now=True) manually_approves_followers = fields.BooleanField(default=False) show_goal = models.BooleanField(default=True) - show_in_directory = models.BooleanField(default=False) + discoverable = fields.BooleanField(default=False) name_field = "username" diff --git a/bookwyrm/templates/layout.html b/bookwyrm/templates/layout.html index c7d10b57..b25bef45 100644 --- a/bookwyrm/templates/layout.html +++ b/bookwyrm/templates/layout.html @@ -107,7 +107,7 @@ {% endif %} {% if perms.bookwyrm.create_invites %}
  • - + {% trans 'Invites' %}
  • diff --git a/bookwyrm/tests/data/ap_user.json b/bookwyrm/tests/data/ap_user.json index b159ae65..bc4488e3 100644 --- a/bookwyrm/tests/data/ap_user.json +++ b/bookwyrm/tests/data/ap_user.json @@ -28,6 +28,9 @@ }, "bookwyrmUser": true, "manuallyApprovesFollowers": false, + "discoverable": true, + "devices": "https://friend.camp/users/tripofmice/collections/devices", + "tag": [], "icon": { "type": "Image", "mediaType": "image/png", diff --git a/bookwyrm/tests/views/test_inbox.py b/bookwyrm/tests/views/test_inbox.py index b681b961..10f55f89 100644 --- a/bookwyrm/tests/views/test_inbox.py +++ b/bookwyrm/tests/views/test_inbox.py @@ -789,6 +789,7 @@ class Inbox(TestCase): self.assertEqual(user.name, "MOUSE?? MOUSE!!") self.assertEqual(user.username, "mouse@example.com") self.assertEqual(user.localname, "mouse") + self.assertTrue(user.discoverable) def test_handle_update_edition(self): """ update an existing edition """