Merge remote-tracking branch 'remotes/origin/develop' into 1364-notifications-sending-control

This commit is contained in:
Ivan Tashkinov 2020-03-25 09:05:17 +03:00
commit 012d428e1f
122 changed files with 1476 additions and 520 deletions

View file

@ -79,7 +79,6 @@ defmodule Pleroma.Notification do
|> exclude_notification_muted(user, exclude_notification_muted_opts)
|> exclude_blocked(user, exclude_blocked_opts)
|> exclude_visibility(opts)
|> exclude_move(opts)
end
defp exclude_blocked(query, user, opts) do
@ -109,14 +108,6 @@ defmodule Pleroma.Notification do
|> where([n, a, o, tm], is_nil(tm.user_id))
end
defp exclude_move(query, %{with_move: true}) do
query
end
defp exclude_move(query, _opts) do
where(query, [n, a], fragment("?->>'type' != 'Move'", a.data))
end
@valid_visibilities ~w[direct unlisted public private]
defp exclude_visibility(query, %{exclude_visibilities: visibility})