summaryrefslogtreecommitdiffstats
path: root/users
diff options
context:
space:
mode:
Diffstat (limited to 'users')
-rw-r--r--users/models/identity.py8
-rw-r--r--users/models/system_actor.py1
-rw-r--r--users/views/activitypub.py3
3 files changed, 7 insertions, 5 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,
diff --git a/users/views/activitypub.py b/users/views/activitypub.py
index d80a1c8..2d17afd 100644
--- a/users/views/activitypub.py
+++ b/users/views/activitypub.py
@@ -219,5 +219,6 @@ class SystemActorView(View):
canonicalise(
SystemActor().to_ap(),
include_security=True,
- )
+ ),
+ content_type="application/activity+json",
)