ActivityPub: Remove leftover printf debugging.
This commit is contained in:
parent
fcf2f38d20
commit
920bd47055
|
@ -533,22 +533,17 @@ def fetch_public_activities(opts \\ %{}) do
|
||||||
defp restrict_visibility(query, %{visibility: visibility})
|
defp restrict_visibility(query, %{visibility: visibility})
|
||||||
when is_list(visibility) do
|
when is_list(visibility) do
|
||||||
if Enum.all?(visibility, &(&1 in @valid_visibilities)) do
|
if Enum.all?(visibility, &(&1 in @valid_visibilities)) do
|
||||||
query =
|
from(
|
||||||
from(
|
a in query,
|
||||||
a in query,
|
where:
|
||||||
where:
|
fragment(
|
||||||
fragment(
|
"activity_visibility(?, ?, ?) = ANY (?)",
|
||||||
"activity_visibility(?, ?, ?) = ANY (?)",
|
a.actor,
|
||||||
a.actor,
|
a.recipients,
|
||||||
a.recipients,
|
a.data,
|
||||||
a.data,
|
^visibility
|
||||||
^visibility
|
)
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
|
||||||
Ecto.Adapters.SQL.to_sql(:all, Repo, query)
|
|
||||||
|
|
||||||
query
|
|
||||||
else
|
else
|
||||||
Logger.error("Could not restrict visibility to #{visibility}")
|
Logger.error("Could not restrict visibility to #{visibility}")
|
||||||
end
|
end
|
||||||
|
@ -556,16 +551,11 @@ defp restrict_visibility(query, %{visibility: visibility})
|
||||||
|
|
||||||
defp restrict_visibility(query, %{visibility: visibility})
|
defp restrict_visibility(query, %{visibility: visibility})
|
||||||
when visibility in @valid_visibilities do
|
when visibility in @valid_visibilities do
|
||||||
query =
|
from(
|
||||||
from(
|
a in query,
|
||||||
a in query,
|
where:
|
||||||
where:
|
fragment("activity_visibility(?, ?, ?) = ?", a.actor, a.recipients, a.data, ^visibility)
|
||||||
fragment("activity_visibility(?, ?, ?) = ?", a.actor, a.recipients, a.data, ^visibility)
|
)
|
||||||
)
|
|
||||||
|
|
||||||
Ecto.Adapters.SQL.to_sql(:all, Repo, query)
|
|
||||||
|
|
||||||
query
|
|
||||||
end
|
end
|
||||||
|
|
||||||
defp restrict_visibility(_query, %{visibility: visibility})
|
defp restrict_visibility(_query, %{visibility: visibility})
|
||||||
|
|
Loading…
Reference in New Issue