forked from AkkomaGang/akkoma
Mix format
This commit is contained in:
parent
fd1fa5a2ec
commit
452980652d
2 changed files with 32 additions and 28 deletions
|
@ -885,7 +885,9 @@ def favourited_by(%{assigns: %{user: user}} = conn, %{"id" => id}) do
|
||||||
q = from(u in User, where: u.ap_id in ^likes)
|
q = from(u in User, where: u.ap_id in ^likes)
|
||||||
|
|
||||||
users = Repo.all(q)
|
users = Repo.all(q)
|
||||||
users = if is_nil(user) do
|
|
||||||
|
users =
|
||||||
|
if is_nil(user) do
|
||||||
users
|
users
|
||||||
else
|
else
|
||||||
Enum.filter(users, &(not User.blocks?(user, &1)))
|
Enum.filter(users, &(not User.blocks?(user, &1)))
|
||||||
|
@ -905,7 +907,9 @@ def reblogged_by(%{assigns: %{user: user}} = conn, %{"id" => id}) do
|
||||||
q = from(u in User, where: u.ap_id in ^announces)
|
q = from(u in User, where: u.ap_id in ^announces)
|
||||||
|
|
||||||
users = Repo.all(q)
|
users = Repo.all(q)
|
||||||
users = if is_nil(user) do
|
|
||||||
|
users =
|
||||||
|
if is_nil(user) do
|
||||||
users
|
users
|
||||||
else
|
else
|
||||||
Enum.filter(users, &(not User.blocks?(user, &1)))
|
Enum.filter(users, &(not User.blocks?(user, &1)))
|
||||||
|
|
Loading…
Reference in a new issue