Merge remote-tracking branch 'pleroma/develop' into cycles-gun
[akkoma] / lib / pleroma / web / activity_pub / internal_fetch_actor.ex
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Web.ActivityPub.InternalFetchActor do
6 alias Pleroma.User
7
8 require Logger
9
10 def init do
11 # Wait for everything to settle.
12 Process.sleep(1000 * 5)
13 get_actor()
14 end
15
16 def get_actor do
17 "#{Pleroma.Web.Endpoint.url()}/internal/fetch"
18 |> User.get_or_create_service_actor_by_ap_id("internal.fetch")
19 end
20 end