projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3b18789
)
Fix the issue with get_by_nickname never being called
author
rinpatch
<rinpatch@sdf.org>
Thu, 17 Jan 2019 16:00:08 +0000
(19:00 +0300)
committer
rinpatch
<rinpatch@sdf.org>
Thu, 17 Jan 2019 16:00:08 +0000
(19:00 +0300)
lib/pleroma/user.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/user.ex
b/lib/pleroma/user.ex
index 180ef180c63839ca9fd16ac64926b75103c37f6c..13a476fd2911921114a05df3e84e7fe921b9f2bd 100644
(file)
--- a/
lib/pleroma/user.ex
+++ b/
lib/pleroma/user.ex
@@
-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)