set user url from AP key uri

pull/25012/head
Pascal Deklerck 2023-10-03 21:13:10 +02:00
parent 161b4a16f0
commit 3fd595b5bd
1 changed files with 1 additions and 4 deletions

View File

@ -29,10 +29,7 @@ class MagicController < ApplicationController
owapath = URI("#{parsed.scheme}://#{host}#{port == 80 ? '' : ":#{port}"}/owa")
debug("Sending to #{owapath}")
# I could not find a better way to get the user URL (account.url is empty)
# I found this way in the content_security_policy.rb initializer
base_host = Rails.configuration.x.web_domain
user_url = "#{host_to_url(base_host)}/@#{account.username}"
user_url = ActivityPub::TagManager.instance.key_uri_for(account)
debug("User URL: #{user_url}")
headers = {