logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: e5e76ec44559af62eb56043add0489c61e6c1ee5
parent dc4de79d43ba941d8aa16f7c14887faae9f65e9f
Author: Faried Nawaz <faried@gmail.com>
Date:   Fri, 10 Feb 2023 01:32:32 +0500

cleaner ecto query to handle restrict_unauthenticated for activities

This fix is for this case:

  config :pleroma, :restrict_unauthenticated,
    activities: %{local: true, remote: true}

Diffstat:

Mlib/pleroma/web/activity_pub/activity_pub.ex3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 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)