Commit 388ceb6a authored by rinpatch's avatar rinpatch
Browse files

Fix the issue with get_by_nickname never being called

parent 3b187896
...@@ -449,8 +449,13 @@ def get_cached_by_id(id) do ...@@ -449,8 +449,13 @@ def get_cached_by_id(id) do
ap_id = ap_id =
Cachex.fetch!(:user_cache, key, fn _ -> Cachex.fetch!(:user_cache, key, fn _ ->
user = get_by_id(id) 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) end)
get_cached_by_ap_id(ap_id) get_cached_by_ap_id(ap_id)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment