summaryrefslogtreecommitdiffstats
path: root/users
diff options
context:
space:
mode:
Diffstat (limited to 'users')
-rw-r--r--users/models/identity.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/users/models/identity.py b/users/models/identity.py
index c80d9d9..2190c9c 100644
--- a/users/models/identity.py
+++ b/users/models/identity.py
@@ -165,6 +165,12 @@ class Identity(StatorModel):
)
if handle is None:
return None
+ # See if this actually does match an existing actor
+ try:
+ return cls.objects.get(actor_uri=actor_uri)
+ except cls.DoesNotExist:
+ pass
+ # OK, make one
username, domain = handle.split("@")
domain = Domain.get_remote_domain(domain)
return cls.objects.create(