debianize-mobilizon/lib/mix/tasks/mobilizon/relay.ex

41 lines
964 B
Elixir
Raw Permalink Normal View History

# Portions of this file are derived from Pleroma:
# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social>
# SPDX-License-Identifier: AGPL-3.0-only
# Upstream: https://git.pleroma.social/pleroma/pleroma/blob/develop/lib/mix/tasks/pleroma/relay.ex
defmodule Mix.Tasks.Mobilizon.Relay do
@moduledoc """
Manages remote relays
## Follow a remote relay
``mix mobilizon.relay follow <relay_url>``
Example: ``mix mobilizon.relay follow https://example.org/relay``
## Unfollow a remote relay
``mix mobilizon.relay unfollow <relay_url>``
Example: ``mix mobilizon.relay unfollow https://example.org/relay``
"""
2019-09-22 16:26:23 +02:00
use Mix.Task
alias Mix.Tasks
import Mix.Tasks.Mobilizon.Common
2019-09-22 16:26:23 +02:00
@shortdoc "Manages remote relays"
@impl Mix.Task
def run(_) do
shell_info("\nAvailable tasks:")
if mix_shell?() do
Tasks.Help.run(["--search", "mobilizon.relay."])
else
show_subtasks_for_module(__MODULE__)
end
end
end