Revert "User.get_or_fetch_public_key_for_ap_id/1 is no longer required."
This reverts commit c0a50b7c3e.
This commit is contained in:
parent
8f9a139ba1
commit
1610d39f36
2 changed files with 14 additions and 0 deletions
|
|
@ -2307,6 +2307,15 @@ defmodule Pleroma.User do
|
|||
|
||||
def public_key(_), do: {:error, "key not found"}
|
||||
|
||||
def get_or_fetch_public_key_for_ap_id(ap_id) do
|
||||
with {:ok, %User{} = user} <- get_or_fetch_by_ap_id(ap_id),
|
||||
{:ok, public_key} <- public_key(user) do
|
||||
{:ok, public_key}
|
||||
else
|
||||
_ -> :error
|
||||
end
|
||||
end
|
||||
|
||||
def get_public_key_for_ap_id(ap_id) do
|
||||
with %User{} = user <- get_cached_by_ap_id(ap_id),
|
||||
{:ok, public_key} <- public_key(user) do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue