1 defmodule Mix.Tasks.RelayFollow do
4 alias Pleroma.Web.ActivityPub.Relay
6 @shortdoc "Follows a remote relay"
10 Usage: ``mix relay_follow <relay_url>``
12 Example: ``mix relay_follow https://example.org/relay``
15 Mix.Task.run("app.start")
17 with {:ok, activity} <- Relay.follow(target) do
18 # put this task to sleep to allow the genserver to push out the messages
21 {:error, e} -> Mix.shell().error("Error while following #{target}: #{inspect(e)}")