Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2023-07-09 19:10:19 +02:00
parent ba8c734818
commit 5f5e95ebcd

View file

@ -1424,8 +1424,9 @@ def get_friends_ids(%User{} = user, page \\ nil) do
@spec get_familiar_followers_query(User.t(), User.t(), pos_integer() | nil) :: Ecto.Query.t()
def get_familiar_followers_query(%User{} = user, %User{} = current_user, nil) do
friends = get_friends_query(current_user)
|> select([u], u.id)
friends =
get_friends_query(current_user)
|> select([u], u.id)
User.Query.build(%{is_active: true})
|> where([u], u.id not in ^[user.id, current_user.id])