Ensure self-announces do not widen the audience of the original post
[akkoma] / lib / pleroma / web / activity_pub / activity_pub.ex
index 95f994c17055470ea885120561808c5b54c87d99..c52efb57871a5dcc100143957eff6f3bb455116c 100644 (file)
@@ -346,7 +346,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
         local \\ true,
         public \\ true
       ) do
-    with true <- is_public?(object),
+    with true <- is_announceable?(object, user, public),
          announce_data <- make_announce_data(user, object, activity_id, public),
          {:ok, activity} <- insert(announce_data, local),
          {:ok, object} <- add_announce_to_object(activity, object),