summaryrefslogtreecommitdiff
path: root/lib/mix/tasks/pleroma/relay.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mix/tasks/pleroma/relay.ex')
-rw-r--r--lib/mix/tasks/pleroma/relay.ex17
1 files changed, 13 insertions, 4 deletions
diff --git a/lib/mix/tasks/pleroma/relay.ex b/lib/mix/tasks/pleroma/relay.ex
index a738fae75..0df6b53ff 100644
--- a/lib/mix/tasks/pleroma/relay.ex
+++ b/lib/mix/tasks/pleroma/relay.ex
@@ -53,10 +53,19 @@ 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()
+ with %User{following: following} = user <- Relay.get_actor() do
+ accepted =
+ following
+ |> Enum.map(fn entry -> URI.parse(entry).host end)
+ |> Enum.uniq()
+
+ without_accept =
+ user
+ |> Pleroma.Activity.following_requests_for_actor()
+ |> Enum.map(fn a -> URI.parse(a.data["object"]).host <> " (no Accept received)" end)
+ |> Enum.uniq()
+
+ (accepted ++ without_accept)
|> Enum.each(&shell_info(&1))
else
e -> shell_error("Error while fetching relay subscription list: #{inspect(e)}")