parent
d6bed599c8
commit
b86b3a9e29
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/).
|
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
|
## 2023.04
|
||||||
|
|
||||||
## Added
|
## Added
|
||||||
|
|
|
@ -17,6 +17,7 @@ defmodule Pleroma.Signature do
|
||||||
key_id
|
key_id
|
||||||
|> URI.parse()
|
|> URI.parse()
|
||||||
|> Map.put(:fragment, nil)
|
|> Map.put(:fragment, nil)
|
||||||
|
|> Map.put(:query, nil)
|
||||||
|> remove_suffix(@known_suffixes)
|
|> remove_suffix(@known_suffixes)
|
||||||
|
|
||||||
maybe_ap_id = URI.to_string(uri)
|
maybe_ap_id = URI.to_string(uri)
|
||||||
|
|
|
@ -114,6 +114,11 @@ defmodule Pleroma.SignatureTest do
|
||||||
{:ok, "https://example.com/users/1234"}
|
{:ok, "https://example.com/users/1234"}
|
||||||
end
|
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
|
test "it calls webfinger for 'acct:' accounts" do
|
||||||
with_mock(Pleroma.Web.WebFinger,
|
with_mock(Pleroma.Web.WebFinger,
|
||||||
finger: fn _ -> {:ok, %{"ap_id" => "https://gensokyo.2hu/users/raymoo"}} end
|
finger: fn _ -> {:ok, %{"ap_id" => "https://gensokyo.2hu/users/raymoo"}} end
|
||||||
|
|
Loading…
Reference in a new issue