aboutsummaryrefslogtreecommitdiff
path: root/lib/mix/tasks/pleroma/relay.ex
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2019-11-05 15:21:00 +0100
committerlain <lain@soykaf.club>2019-11-05 15:21:00 +0100
commit1bd1f62af55e01613e6362661b36a19091c87424 (patch)
tree519963a50af82c1a0b251f1405d663ba9ccd4714 /lib/mix/tasks/pleroma/relay.ex
parentfaced6236b9e2ce9675cf743068f16098b744562 (diff)
parentf11eebc18383be7d7b4b037582e4e1e08b74653b (diff)
downloadpleroma-1bd1f62af55e01613e6362661b36a19091c87424.tar.gz
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into remake-remodel
Diffstat (limited to 'lib/mix/tasks/pleroma/relay.ex')
-rw-r--r--lib/mix/tasks/pleroma/relay.ex10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/mix/tasks/pleroma/relay.ex b/lib/mix/tasks/pleroma/relay.ex
index d7a7b599f..7ef5f9678 100644
--- a/lib/mix/tasks/pleroma/relay.ex
+++ b/lib/mix/tasks/pleroma/relay.ex
@@ -5,7 +5,6 @@
defmodule Mix.Tasks.Pleroma.Relay do
use Mix.Task
import Mix.Pleroma
- alias Pleroma.User
alias Pleroma.Web.ActivityPub.Relay
@shortdoc "Manages remote relays"
@@ -36,13 +35,10 @@ defmodule Mix.Tasks.Pleroma.Relay do
def run(["list"]) do
start_pleroma()
- with %User{following: following} = _user <- Relay.get_actor() do
- following
- |> Enum.map(fn entry -> URI.parse(entry).host end)
- |> Enum.uniq()
- |> Enum.each(&shell_info(&1))
+ with {:ok, list} <- Relay.list() do
+ list |> Enum.each(&shell_info(&1))
else
- e -> shell_error("Error while fetching relay subscription list: #{inspect(e)}")
+ {:error, e} -> shell_error("Error while fetching relay subscription list: #{inspect(e)}")
end
end
end