get_cached_by_ap_id/1 returns a single result, not a tuple

This commit is contained in:
Mark Felder 2023-12-08 18:10:22 -05:00
parent 0d3f1be230
commit ce5acd4158

View File

@ -2145,7 +2145,7 @@ defmodule Pleroma.User do
end end
def get_public_key_for_ap_id(ap_id) do def get_public_key_for_ap_id(ap_id) do
with {:ok, %User{} = user} <- get_cached_by_ap_id(ap_id), with %User{} = user <- get_cached_by_ap_id(ap_id),
{:ok, public_key} <- public_key(user) do {:ok, public_key} <- public_key(user) do
{:ok, public_key} {:ok, public_key}
else else