diff --git a/lib/pleroma/signature.ex b/lib/pleroma/signature.ex index 3d33fcd62..c4ac2c87e 100644 --- a/lib/pleroma/signature.ex +++ b/lib/pleroma/signature.ex @@ -10,7 +10,7 @@ defmodule Pleroma.Signature do alias Pleroma.User alias Pleroma.Web.ActivityPub.ActivityPub - @known_suffixes ["/publickey", "/main-key"] + @known_suffixes ["/publickey", "/main-key", "#key"] def key_id_to_actor_id(key_id) do uri = diff --git a/test/pleroma/signature_test.exs b/test/pleroma/signature_test.exs index e2d02fe4c..c946da9ef 100644 --- a/test/pleroma/signature_test.exs +++ b/test/pleroma/signature_test.exs @@ -153,6 +153,11 @@ test "it deduces the actor ID for streams" do {:ok, "https://example.com/users/1234"} end + test "it deduces the actor ID for bridgy" do + assert Signature.key_id_to_actor_id("https://example.com/1234#key") == + {:ok, "https://example.com/1234"} + end + test "it calls webfinger for 'acct:' accounts" do with_mock(Pleroma.Web.WebFinger, finger: fn _ -> {:ok, %{"ap_id" => "https://gensokyo.2hu/users/raymoo"}} end