diff options
author | Andrew Godwin | 2022-12-17 12:00:47 -0700 |
---|---|---|
committer | Andrew Godwin | 2022-12-17 12:00:47 -0700 |
commit | 62f2b867b9dbdfde6be79b729515711c5c2cd877 (patch) | |
tree | 284fe76602d3afdee41d7840fda04aae12ac08c7 /users/models | |
parent | d7ffb47fb2d973fd2d6eea09c57fd3620d6b6af1 (diff) | |
download | takahe-62f2b867b9dbdfde6be79b729515711c5c2cd877.tar.gz takahe-62f2b867b9dbdfde6be79b729515711c5c2cd877.tar.bz2 takahe-62f2b867b9dbdfde6be79b729515711c5c2cd877.zip |
Fix serving of system actor
Fixes #183
Diffstat (limited to 'users/models')
-rw-r--r-- | users/models/identity.py | 8 | ||||
-rw-r--r-- | users/models/system_actor.py | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/users/models/identity.py b/users/models/identity.py index a1167e5..0ea590e 100644 --- a/users/models/identity.py +++ b/users/models/identity.py @@ -398,10 +398,10 @@ class Identity(StatorModel): """ domain = handle.split("@")[1].lower() try: - response = await SystemActor().signed_request( - method="get", - uri=f"https://{domain}/.well-known/webfinger?resource=acct:{handle}", - ) + async with httpx.AsyncClient() as client: + response = await client.get( + f"https://{domain}/.well-known/webfinger?resource=acct:{handle}", + ) except (httpx.RequestError, httpx.ConnectError): return None, None if response.status_code in [404, 410]: diff --git a/users/models/system_actor.py b/users/models/system_actor.py index 46a0007..5869f92 100644 --- a/users/models/system_actor.py +++ b/users/models/system_actor.py @@ -49,6 +49,7 @@ class SystemActor: "preferredUsername": self.username, "url": self.profile_uri, "manuallyApprovesFollowers": True, + "toot:discoverable": False, "publicKey": { "id": self.public_key_id, "owner": self.actor_uri, |