Fix the issue with get_by_nickname never being called
This commit is contained in:
parent
3b18789684
commit
388ceb6a7d
@ -449,8 +449,13 @@ defmodule Pleroma.User do
|
||||
ap_id =
|
||||
Cachex.fetch!(:user_cache, key, fn _ ->
|
||||
user = get_by_id(id)
|
||||
Cachex.put(:user_cache, "ap_id:#{user.ap_id}", user)
|
||||
{:commit, user.ap_id}
|
||||
|
||||
if user do
|
||||
Cachex.put(:user_cache, "ap_id:#{user.ap_id}", user)
|
||||
{:commit, user.ap_id}
|
||||
else
|
||||
{:ignore, ""}
|
||||
end
|
||||
end)
|
||||
|
||||
get_cached_by_ap_id(ap_id)
|
||||
|
Loading…
Reference in New Issue
Block a user