Updates activitpub and tests for discoverability

This commit is contained in:
Mouse Reeve 2021-03-21 14:50:36 -07:00
parent 16994908d8
commit 3e75253ff1
5 changed files with 7 additions and 3 deletions

View file

@ -30,5 +30,5 @@ class Person(ActivityObject):
icon: Image = field(default_factory=lambda: {}) icon: Image = field(default_factory=lambda: {})
bookwyrmUser: bool = False bookwyrmUser: bool = False
manuallyApprovesFollowers: str = False manuallyApprovesFollowers: str = False
discoverable: str = True discoverable: str = False
type: str = "Person" type: str = "Person"

View file

@ -103,7 +103,7 @@ class User(OrderedCollectionPageMixin, AbstractUser):
last_active_date = models.DateTimeField(auto_now=True) last_active_date = models.DateTimeField(auto_now=True)
manually_approves_followers = fields.BooleanField(default=False) manually_approves_followers = fields.BooleanField(default=False)
show_goal = models.BooleanField(default=True) show_goal = models.BooleanField(default=True)
show_in_directory = models.BooleanField(default=False) discoverable = fields.BooleanField(default=False)
name_field = "username" name_field = "username"

View file

@ -107,7 +107,7 @@
{% endif %} {% endif %}
{% if perms.bookwyrm.create_invites %} {% if perms.bookwyrm.create_invites %}
<li> <li>
<a href="{% url 'settings-invites' %}" class="navbar-item"> <a href="{% url 'settings-invite-requests' %}" class="navbar-item">
{% trans 'Invites' %} {% trans 'Invites' %}
</a> </a>
</li> </li>

View file

@ -28,6 +28,9 @@
}, },
"bookwyrmUser": true, "bookwyrmUser": true,
"manuallyApprovesFollowers": false, "manuallyApprovesFollowers": false,
"discoverable": true,
"devices": "https://friend.camp/users/tripofmice/collections/devices",
"tag": [],
"icon": { "icon": {
"type": "Image", "type": "Image",
"mediaType": "image/png", "mediaType": "image/png",

View file

@ -789,6 +789,7 @@ class Inbox(TestCase):
self.assertEqual(user.name, "MOUSE?? MOUSE!!") self.assertEqual(user.name, "MOUSE?? MOUSE!!")
self.assertEqual(user.username, "mouse@example.com") self.assertEqual(user.username, "mouse@example.com")
self.assertEqual(user.localname, "mouse") self.assertEqual(user.localname, "mouse")
self.assertTrue(user.discoverable)
def test_handle_update_edition(self): def test_handle_update_edition(self):
""" update an existing edition """ """ update an existing edition """