Merge 2023.05 stable #8

Merged
fedward merged 29 commits from AkkomaGang/akkoma:stable into stable 2023-05-30 19:19:23 +00:00
3 changed files with 11 additions and 0 deletions
Showing only changes of commit b86b3a9e29 - Show all commits

View file

@ -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

View file

@ -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)

View file

@ -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