forked from AkkomaGang/akkoma
Merge 2023.05 stable #8
3 changed files with 11 additions and 0 deletions
|
@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
|
|||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
|
||||
## Unreleased
|
||||
|
||||
## Fixed
|
||||
- Support for `streams` public key URIs
|
||||
|
||||
## 2023.04
|
||||
|
||||
## Added
|
||||
|
|
|
@ -17,6 +17,7 @@ def key_id_to_actor_id(key_id) do
|
|||
key_id
|
||||
|> URI.parse()
|
||||
|> Map.put(:fragment, nil)
|
||||
|> Map.put(:query, nil)
|
||||
|> remove_suffix(@known_suffixes)
|
||||
|
||||
maybe_ap_id = URI.to_string(uri)
|
||||
|
|
|
@ -114,6 +114,11 @@ test "it deduces the actor id for gotoSocial" do
|
|||
{:ok, "https://example.com/users/1234"}
|
||||
end
|
||||
|
||||
test "it deduces the actor ID for streams" do
|
||||
assert Signature.key_id_to_actor_id("https://example.com/users/1234?operation=getkey") ==
|
||||
{:ok, "https://example.com/users/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
|
||||
|
|
Loading…
Reference in a new issue