Skip to content

Commit

Permalink
Fix federation of Follow request
Browse files Browse the repository at this point in the history
Signed-off-by: ziadhany <[email protected]>
  • Loading branch information
ziadhany committed Nov 6, 2023
1 parent cf9a99c commit 22587a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion purl_sync/review/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def ap_collection(objects):
def webfinger_actor(domain, user):
""" """
acct = generate_webfinger(user, domain)
url = f"https://{domain}/.well-known/webfinger?resource=acct:{acct}"
url = f"http://{domain}/.well-known/webfinger?resource=acct:{acct}" # TODO http -> https
headers = {"User-Agent": ""} # TODO
try:
response = requests.get(url, headers=headers)
Expand Down
2 changes: 1 addition & 1 deletion purl_sync/review/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ def post(self, request, *args, **kwargs):
form = SubscribePurlForm(request.POST)
if form.is_valid():
user, domain = parse_webfinger(form.cleaned_data.get("acct"))
remote_actor_url = webfinger_actor(user, domain)
remote_actor_url = webfinger_actor(domain, user)

payload = json.dumps(
{
Expand Down

0 comments on commit 22587a4

Please sign in to comment.