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:
parent
161b4a16f0
commit
3fd595b5bd
1 changed files with 1 additions and 4 deletions
|
@ -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 = {
|
||||||
|
|
Loading…
Reference in a new issue