From 3fd595b5bd2a33c7cd52b1f4eb3db3049ad133b9 Mon Sep 17 00:00:00 2001 From: Pascal Deklerck Date: Tue, 3 Oct 2023 21:13:10 +0200 Subject: [PATCH] set user url from AP key uri --- app/controllers/magic_controller.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/controllers/magic_controller.rb b/app/controllers/magic_controller.rb index e90ea363ce..0947500cff 100644 --- a/app/controllers/magic_controller.rb +++ b/app/controllers/magic_controller.rb @@ -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 = {