aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/user.ex
diff options
context:
space:
mode:
authorEgor Kislitsyn <egor@kislitsyn.com>2019-04-02 17:01:26 +0700
committerEgor Kislitsyn <egor@kislitsyn.com>2019-04-02 17:01:26 +0700
commit1b3d92192194baf6b431cd9f0ce58062d1b703d5 (patch)
tree2f81ff81c7b039ccbb482e5212af554a8982ac40 /lib/pleroma/user.ex
parent4212527928020de5b67424f090c67fc20d0844af (diff)
downloadpleroma-1b3d92192194baf6b431cd9f0ce58062d1b703d5.tar.gz
change `Repo.get(User, id)` => `User.get_by_id(id)`
Diffstat (limited to 'lib/pleroma/user.ex')
-rw-r--r--lib/pleroma/user.ex8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex
index 728b00a56..eb305dd95 100644
--- a/lib/pleroma/user.ex
+++ b/lib/pleroma/user.ex
@@ -1231,8 +1231,8 @@ defmodule Pleroma.User do
# this is because we have synchronous follow APIs and need to simulate them
# with an async handshake
def wait_and_refresh(_, %User{local: true} = a, %User{local: true} = b) do
- with %User{} = a <- Repo.get(User, a.id),
- %User{} = b <- Repo.get(User, b.id) do
+ with %User{} = a <- User.get_by_id(a.id),
+ %User{} = b <- User.get_by_id(b.id) do
{:ok, a, b}
else
_e ->
@@ -1242,8 +1242,8 @@ defmodule Pleroma.User do
def wait_and_refresh(timeout, %User{} = a, %User{} = b) do
with :ok <- :timer.sleep(timeout),
- %User{} = a <- Repo.get(User, a.id),
- %User{} = b <- Repo.get(User, b.id) do
+ %User{} = a <- User.get_by_id(a.id),
+ %User{} = b <- User.get_by_id(b.id) do
{:ok, a, b}
else
_e ->