projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
FedSockets: fix log spam on cached rejects
[akkoma]
/
lib
/
pleroma
/
user.ex
diff --git
a/lib/pleroma/user.ex
b/lib/pleroma/user.ex
index 1ffe60dfc345d80c63afdf2ceb90b5cf8ca9cd8f..d92484a40b9de23dcbd2a7737d269dc35b491a44 100644
(file)
--- a/
lib/pleroma/user.ex
+++ b/
lib/pleroma/user.ex
@@
-1820,12
+1820,12
@@
defmodule Pleroma.User do
def html_filter_policy(_), do: Config.get([:markup, :scrub_policy])
def html_filter_policy(_), do: Config.get([:markup, :scrub_policy])
- def fetch_by_ap_id(ap_id
), do: ActivityPub.make_user_from_ap_id(ap_id
)
+ def fetch_by_ap_id(ap_id
, opts \\ []), do: ActivityPub.make_user_from_ap_id(ap_id, opts
)
- def get_or_fetch_by_ap_id(ap_id) do
+ def get_or_fetch_by_ap_id(ap_id
, opts \\ []
) do
cached_user = get_cached_by_ap_id(ap_id)
cached_user = get_cached_by_ap_id(ap_id)
- maybe_fetched_user = needs_update?(cached_user) && fetch_by_ap_id(ap_id)
+ maybe_fetched_user = needs_update?(cached_user) && fetch_by_ap_id(ap_id
, opts
)
case {cached_user, maybe_fetched_user} do
{_, {:ok, %User{} = user}} ->
case {cached_user, maybe_fetched_user} do
{_, {:ok, %User{} = user}} ->
@@
-1898,8
+1898,8
@@
defmodule Pleroma.User do
def public_key(_), do: {:error, "key not found"}
def public_key(_), do: {:error, "key not found"}
- def get_public_key_for_ap_id(ap_id) do
- with {:ok, %User{} = user} <- get_or_fetch_by_ap_id(ap_id),
+ def get_public_key_for_ap_id(ap_id
, opts \\ []
) do
+ with {:ok, %User{} = user} <- get_or_fetch_by_ap_id(ap_id
, opts
),
{:ok, public_key} <- public_key(user) do
{:ok, public_key}
else
{:ok, public_key} <- public_key(user) do
{:ok, public_key}
else