Ryan Barrett 2023-11-26 15:44:43 -08:00
rodzic fae7769d2b
commit d7d55864ad
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6BE31FDF4776E9D4
2 zmienionych plików z 11 dodań i 0 usunięć

Wyświetl plik

@ -797,6 +797,9 @@ def actor(handle_or_id):
assert id
user = cls.get_or_create(id)
if not user:
error(f'{cls.LABEL} user {id} not found', status=404)
if not user.obj or not user.obj.as1:
user.obj = cls.load(user.profile_id(), gateway=True)
if user.obj:

Wyświetl plik

@ -461,6 +461,14 @@ class ActivityPubTest(TestCase):
self.assertEqual(301, resp.status_code)
self.assertEqual('https://fed.brid.gy/user.com', resp.headers['Location'])
def test_actor_opted_out(self, *_):
self.user.obj.our_as1['summary'] = '#nobridge'
self.user.obj.put()
self.user.put()
got = self.client.get('/user.com')
self.assertEqual(404, got.status_code)
def test_individual_inbox_no_user(self, mock_head, mock_get, mock_post):
self.user.key.delete()