diff options
Diffstat (limited to 'users/shortcuts.py')
| -rw-r--r-- | users/shortcuts.py | 9 | 
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  | 
