projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop' of https://git.pleroma.social/pleroma/pleroma into develop
[akkoma]
/
lib
/
pleroma
/
user
/
query.ex
diff --git
a/lib/pleroma/user/query.ex
b/lib/pleroma/user/query.ex
index 884e33039d7453caae0166fef206df27798bc107..ec88088cf7459e8bf35a99b718bde76308de7e9c 100644
(file)
--- a/
lib/pleroma/user/query.ex
+++ b/
lib/pleroma/user/query.ex
@@
-148,7
+148,7
@@
defmodule Pleroma.User.Query do
as: :relationships,
on: r.following_id == ^id and r.follower_id == u.id
)
as: :relationships,
on: r.following_id == ^id and r.follower_id == u.id
)
- |> where([relationships: r], r.state ==
"accept"
)
+ |> where([relationships: r], r.state ==
^:follow_accept
)
end
defp compose_query({:friends, %User{id: id}}, query) do
end
defp compose_query({:friends, %User{id: id}}, query) do
@@
-158,7
+158,7
@@
defmodule Pleroma.User.Query do
as: :relationships,
on: r.following_id == u.id and r.follower_id == ^id
)
as: :relationships,
on: r.following_id == u.id and r.follower_id == ^id
)
- |> where([relationships: r], r.state ==
"accept"
)
+ |> where([relationships: r], r.state ==
^:follow_accept
)
end
defp compose_query({:recipients_from_activity, to}, query) do
end
defp compose_query({:recipients_from_activity, to}, query) do
@@
-173,7
+173,7
@@
defmodule Pleroma.User.Query do
)
|> where(
[u, following: f, relationships: r],
)
|> where(
[u, following: f, relationships: r],
- u.ap_id in ^to or (f.follower_address in ^to and r.state ==
"accept"
)
+ u.ap_id in ^to or (f.follower_address in ^to and r.state ==
^:follow_accept
)
)
|> distinct(true)
end
)
|> distinct(true)
end