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:
Faried Nawaz 2023-02-10 01:32:32 +05:00 committed by faried nawaz
parent dc4de79d43
commit e5e76ec445

View File

@ -1222,8 +1222,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub 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)