Pleroma.Constants.as_local_public/0 --> Pleroma.Web.ActivityPub.Utils.as_local_public/0

Move as_local_public/0 to stop making modules depend on Web at compile-time
This commit is contained in:
Alex Gleason 2021-05-31 13:39:15 -05:00
commit 10dfe81479
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
7 changed files with 10 additions and 9 deletions

View file

@ -38,6 +38,8 @@ defmodule Pleroma.Web.ActivityPub.Utils do
@supported_report_states ~w(open closed resolved)
@valid_visibilities ~w(public unlisted private direct)
def as_local_public, do: Web.base_url() <> "/#Public"
# Some implementations send the actor URI as the actor field, others send the entire actor object,
# so figure out what the actor's URI is based on what we have.
def get_ap_id(%{"id" => id} = _), do: id