summaryrefslogtreecommitdiffstats
path: root/users/views
diff options
context:
space:
mode:
authorAndrew Godwin2022-11-09 22:29:33 -0700
committerAndrew Godwin2022-11-09 22:29:49 -0700
commit7746abbbb7700fa918450101bbc6d29ed9b4b608 (patch)
tree8768efd8201faa2fee18e5d3b46f33785002f5d6 /users/views
parent61c324508e62bb640b4526183d0837fc57d742c2 (diff)
downloadtakahe-7746abbbb7700fa918450101bbc6d29ed9b4b608.tar.gz
takahe-7746abbbb7700fa918450101bbc6d29ed9b4b608.tar.bz2
takahe-7746abbbb7700fa918450101bbc6d29ed9b4b608.zip
Most of the way through the stator refactor
Diffstat (limited to 'users/views')
-rw-r--r--users/views/identity.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/users/views/identity.py b/users/views/identity.py
index 41c7880..d02505f 100644
--- a/users/views/identity.py
+++ b/users/views/identity.py
@@ -17,7 +17,7 @@ from core.forms import FormHelper
from core.ld import canonicalise
from core.signatures import HttpSignature
from users.decorators import identity_required
-from users.models import Domain, Follow, Identity
+from users.models import Domain, Follow, Identity, IdentityStates
from users.shortcuts import by_handle_or_404
@@ -34,7 +34,7 @@ class ViewIdentity(TemplateView):
)
statuses = identity.statuses.all()[:100]
if identity.data_age > settings.IDENTITY_MAX_AGE:
- Task.submit("identity_fetch", identity.handle)
+ identity.transition_perform(IdentityStates.outdated)
return {
"identity": identity,
"statuses": statuses,
@@ -129,7 +129,7 @@ class CreateIdentity(FormView):
def form_valid(self, form):
username = form.cleaned_data["username"]
domain = form.cleaned_data["domain"]
- domain_instance = Domain.get_local_domain(domain)
+ domain_instance = Domain.get_domain(domain)
new_identity = Identity.objects.create(
actor_uri=f"https://{domain_instance.uri_domain}/@{username}@{domain}/actor/",
username=username,