1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

set user url from AP key uri

This commit is contained in:
Pascal Deklerck 2023-10-03 21:13:10 +02:00
parent 161b4a16f0
commit 3fd595b5bd

View file

@ -29,10 +29,7 @@ class MagicController < ApplicationController
owapath = URI("#{parsed.scheme}://#{host}#{port == 80 ? '' : ":#{port}"}/owa") owapath = URI("#{parsed.scheme}://#{host}#{port == 80 ? '' : ":#{port}"}/owa")
debug("Sending to #{owapath}") debug("Sending to #{owapath}")
# I could not find a better way to get the user URL (account.url is empty) user_url = ActivityPub::TagManager.instance.key_uri_for(account)
# 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}"
debug("User URL: #{user_url}") debug("User URL: #{user_url}")
headers = { headers = {