diff --git a/bookwyrm/outgoing.py b/bookwyrm/outgoing.py index e9daa8fae..444b2e71d 100644 --- a/bookwyrm/outgoing.py +++ b/bookwyrm/outgoing.py @@ -52,7 +52,7 @@ def handle_remote_webfinger(query): try: user = models.User.objects.get(username=query) except models.User.DoesNotExist: - url = 'https://%s/.well-known/webfinger?resource=acct:@%s' % \ + url = 'https://%s/.well-known/webfinger?resource=acct:%s' % \ (domain, query) try: response = requests.get(url) diff --git a/bookwyrm/wellknown.py b/bookwyrm/wellknown.py index c17e10fc0..9daf31eef 100644 --- a/bookwyrm/wellknown.py +++ b/bookwyrm/wellknown.py @@ -19,14 +19,14 @@ def webfinger(request): if not resource and not resource.startswith('acct:'): return HttpResponseNotFound() - username = resource.replace('acct:@', '') + username = resource.replace('acct:', '') try: user = models.User.objects.get(username=username) except models.User.DoesNotExist: return HttpResponseNotFound('No account found') return JsonResponse({ - 'subject': 'acct:@%s' % (user.username), + 'subject': 'acct:%s' % (user.username), 'links': [ { 'rel': 'self',