cleaner ecto query to handle restrict_unauthenticated for activities
This fix is for this case: config :pleroma, :restrict_unauthenticated, activities: %{local: true, remote: true}
This commit is contained in:
parent
dc4de79d43
commit
e5e76ec445
|
@ -1222,8 +1222,7 @@ defp restrict_unauthenticated(query, nil) do
|
||||||
|
|
||||||
cond do
|
cond do
|
||||||
local and remote ->
|
local and remote ->
|
||||||
# is there a better way to handle this?
|
from(activity in query, where: false)
|
||||||
from(activity in query, where: 1 == 0)
|
|
||||||
|
|
||||||
local ->
|
local ->
|
||||||
from(activity in query, where: activity.local == false)
|
from(activity in query, where: activity.local == false)
|
||||||
|
|
Loading…
Reference in New Issue