Merge branch 'fix/inconsistent-reference' into 'develop'
[akkoma] / lib / pleroma / web / activity_pub / object_validators / announce_validator.ex
index 5a963fca7b232a3bb4a83dee2f7395eea99cfd48..b08a33e6869a01e8af4675d31f81432998bb6a85 100644 (file)
@@ -1,5 +1,5 @@
 # Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
 # SPDX-License-Identifier: AGPL-3.0-only
 
 defmodule Pleroma.Web.ActivityPub.ObjectValidators.AnnounceValidator do
@@ -68,7 +68,7 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.AnnounceValidator do
          false <- Visibility.is_public?(object) do
       same_actor = object.data["actor"] == actor.ap_id
       recipients = get_field(cng, :to) ++ get_field(cng, :cc)
-      local_public = Pleroma.Web.base_url() <> "/#Public"
+      local_public = Pleroma.Constants.as_local_public()
 
       is_public =
         Enum.member?(recipients, Pleroma.Constants.as_public()) or