Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85829843
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/lib/pleroma/web/activity_pub/views/user_view.ex b/lib/pleroma/web/activity_pub/views/user_view.ex
index 9651c7188..f68cad0af 100644
--- a/lib/pleroma/web/activity_pub/views/user_view.ex
+++ b/lib/pleroma/web/activity_pub/views/user_view.ex
@@ -259,7 +259,7 @@ defmodule Pleroma.Web.ActivityPub.UserView do
pinned_objects
|> Enum.sort_by(fn {_, pinned_at} -> pinned_at end, &>=/2)
|> Enum.map(fn {id, _} -> Object.get_cached_by_ap_id(id) end)
- |> Enum.filter(&(&1 && Visibility.public?(&1)))
+ |> Enum.filter(&(&1 && Visibility.public?(&1) && !Visibility.local_public?(&1)))
|> Enum.map(&ObjectView.render("object.json", %{object: &1}))
%{
diff --git a/test/pleroma/web/activity_pub/activity_pub_controller_c2s_test.exs b/test/pleroma/web/activity_pub/activity_pub_controller_c2s_test.exs
index bbd4d4c91..e0b1c1c9e 100644
--- a/test/pleroma/web/activity_pub/activity_pub_controller_c2s_test.exs
+++ b/test/pleroma/web/activity_pub/activity_pub_controller_c2s_test.exs
@@ -182,9 +182,12 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerC2STest do
end
test "the featured collection hides non-public posts that are already pinned" do
+ clear_config([:instance, :max_pinned_statuses], 2)
alice = insert(:user)
{:ok, private} = CommonAPI.post(alice, %{status: "followers", visibility: "private"})
+ {:ok, local} = CommonAPI.post(alice, %{status: "local only", visibility: "local"})
{:ok, alice} = Pleroma.User.add_pinned_object_id(alice, private.data["object"])
+ {:ok, alice} = Pleroma.User.add_pinned_object_id(alice, local.data["object"])
assert featured(alice) == []
end
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Nov 1, 12:50 AM (17 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1802008
Default Alt Text
(1 KB)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline