summaryrefslogtreecommitdiffstats
path: root/users/shortcuts.py
diff options
context:
space:
mode:
authorAndrew Godwin2022-11-07 00:19:00 -0700
committerAndrew Godwin2022-11-07 00:19:00 -0700
commitc391e7bc4151ae148d42acd8bbe303338cdde31c (patch)
treed2b79043a63b52ec4692469eab596d831d396b9a /users/shortcuts.py
parentfb6c409a9af5b8a686e977ee2251c359071e0ec3 (diff)
downloadtakahe-c391e7bc4151ae148d42acd8bbe303338cdde31c.tar.gz
takahe-c391e7bc4151ae148d42acd8bbe303338cdde31c.tar.bz2
takahe-c391e7bc4151ae148d42acd8bbe303338cdde31c.zip
THE FOLLOWS, THEY WORK
Well, in one direction anyway
Diffstat (limited to 'users/shortcuts.py')
-rw-r--r--users/shortcuts.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/users/shortcuts.py b/users/shortcuts.py
index 15b864d..65206a3 100644
--- a/users/shortcuts.py
+++ b/users/shortcuts.py
@@ -18,7 +18,14 @@ def by_handle_or_404(request, handle, local=True, fetch=False):
domain = domain_instance.domain
else:
username, domain = handle.split("@", 1)
- identity = Identity.by_handle(handle, local=local, fetch=fetch)
+ # Resolve the domain to the display domain
+ domain = Domain.get_local_domain(request.META["HTTP_HOST"]).domain
+ identity = Identity.by_username_and_domain(
+ username,
+ domain,
+ local=local,
+ fetch=fetch,
+ )
if identity is None:
raise Http404(f"No identity for handle {handle}")
return identity