diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-11-11 14:16:57 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-11-11 14:16:57 +0300 |
commit | 5cf2c7422b006d477498af8d7618a0d6f7659290 (patch) | |
tree | ad4424dd6ce1f9778eae042665d2cd43864bf268 /lib/pleroma/user.ex | |
parent | 3db988250bcd279f20bd1742ca454aa187d89368 (diff) | |
download | pleroma-5cf2c7422b006d477498af8d7618a0d6f7659290.tar.gz |
[#1335] Applied code review suggestions.
Diffstat (limited to 'lib/pleroma/user.ex')
-rw-r--r-- | lib/pleroma/user.ex | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index d4fc1c093..9dd1ad8fc 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -1090,11 +1090,10 @@ defmodule Pleroma.User do end def blocked_ap_ids(user) do - Repo.all( - from(u in assoc(user, :blocked_users), - select: u.ap_id - ) - ) + user + |> assoc(:blocked_users) + |> select([u], u.ap_id) + |> Repo.all() end @spec subscribers(User.t()) :: [User.t()] |