From c391e7bc4151ae148d42acd8bbe303338cdde31c Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Mon, 7 Nov 2022 00:19:00 -0700 Subject: THE FOLLOWS, THEY WORK Well, in one direction anyway --- users/shortcuts.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'users/shortcuts.py') 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 -- cgit v1.2.3