summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFaried Nawaz <faried@gmail.com>2023-02-10 01:32:32 +0500
committerfaried nawaz <faried@gmail.com>2023-07-28 18:45:59 +0500
commite5e76ec44559af62eb56043add0489c61e6c1ee5 (patch)
tree16076fd67863501b82727426eb33ca30d4aa0a6d
parentdc4de79d43ba941d8aa16f7c14887faae9f65e9f (diff)
downloadpleroma-e5e76ec44559af62eb56043add0489c61e6c1ee5.tar.gz
pleroma-e5e76ec44559af62eb56043add0489c61e6c1ee5.zip
cleaner ecto query to handle restrict_unauthenticated for activities
This fix is for this case: config :pleroma, :restrict_unauthenticated, activities: %{local: true, remote: true}
-rw-r--r--lib/pleroma/web/activity_pub/activity_pub.ex3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex
index f1a12d22d..3979d418e 100644
--- a/lib/pleroma/web/activity_pub/activity_pub.ex
+++ b/lib/pleroma/web/activity_pub/activity_pub.ex
@@ -1222,8 +1222,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
cond do
local and remote ->
- # is there a better way to handle this?
- from(activity in query, where: 1 == 0)
+ from(activity in query, where: false)
local ->
from(activity in query, where: activity.local == false)