def local_only?(activity) do
recipients = Enum.concat(activity.data["to"], Map.get(activity.data, "cc", []))
public = Pleroma.Constants.as_public()
- local = Pleroma.Web.base_url() <> "/#Public"
+ local = Pleroma.Constants.as_local_public()
Enum.member?(recipients, local) and not Enum.member?(recipients, public)
end
do:
~w(index.html robots.txt static static-fe finmoji emoji packs sounds images instance sw.js sw-pleroma.js favicon.png schemas doc embed.js embed.css)
)
+
+ def as_local_public, do: Pleroma.Web.base_url() <> "/#Public"
end
[actor.follower_address]
public? and Pleroma.Activity.local_only?(object) ->
- [actor.follower_address, object.data["actor"], Pleroma.Web.base_url() <> "/#Public"]
+ [actor.follower_address, object.data["actor"], Pleroma.Constants.as_local_public()]
public? ->
[actor.follower_address, object.data["actor"], Pleroma.Constants.as_public()]
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
def is_public?(data) do
Utils.label_in_message?(Pleroma.Constants.as_public(), data) or
- Utils.label_in_message?(Pleroma.Web.base_url() <> "/#Public", data)
+ Utils.label_in_message?(Pleroma.Constants.as_local_public(), data)
end
def is_private?(activity) do
def get_to_and_cc(%{visibility: {:list, _}, mentions: mentions}), do: {mentions, []}
- defp public_uri(%{params: %{local_only: true}}), do: Pleroma.Web.base_url() <> "/#Public"
+ defp public_uri(%{params: %{local_only: true}}), do: Pleroma.Constants.as_local_public()
defp public_uri(_), do: Pleroma.Constants.as_public()
def get_addressed_users(_, to) when is_list(to) do
"local_only" => "true"
})
- local = Pleroma.Web.base_url() <> "/#Public"
+ local = Pleroma.Constants.as_local_public()
assert %{"content" => "cofe", "id" => id, "pleroma" => %{"local_only" => true}} =
json_response(conn_one, 200)