aboutsummaryrefslogtreecommitdiff
path: root/lib/mix/tasks/pleroma/relay.ex
diff options
context:
space:
mode:
authorRin Toshaka <rinpatch@sdf.org>2018-12-06 18:00:24 +0100
committerRin Toshaka <rinpatch@sdf.org>2018-12-06 18:00:24 +0100
commit4a2a7ce636ac4616ec71665b4af4ee0ab884ac15 (patch)
tree04a5a9c4f2d8785e0aacc7513c80a82266287e9c /lib/mix/tasks/pleroma/relay.ex
parent3a84511df10b647f08d5ec2df789663b60646c02 (diff)
downloadpleroma-4a2a7ce636ac4616ec71665b4af4ee0ab884ac15.tar.gz
Refactor common functions to common.ex
Diffstat (limited to 'lib/mix/tasks/pleroma/relay.ex')
-rw-r--r--lib/mix/tasks/pleroma/relay.ex6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/mix/tasks/pleroma/relay.ex b/lib/mix/tasks/pleroma/relay.ex
index eaaded5cb..828c7cd3d 100644
--- a/lib/mix/tasks/pleroma/relay.ex
+++ b/lib/mix/tasks/pleroma/relay.ex
@@ -1,6 +1,7 @@
defmodule Mix.Tasks.Pleroma.Relay do
use Mix.Task
alias Pleroma.Web.ActivityPub.Relay
+ alias Mix.Tasks.Pleroma.Common
@shortdoc "Manages remote relays"
@moduledoc """
@@ -19,8 +20,7 @@ defmodule Mix.Tasks.Pleroma.Relay do
Example: ``mix pleroma.relay unfollow https://example.org/relay``
"""
def run(["follow", target]) do
- Mix.Task.run("app.start")
-
+ Common.start_pleroma
with {:ok, activity} <- Relay.follow(target) do
# put this task to sleep to allow the genserver to push out the messages
:timer.sleep(500)
@@ -30,7 +30,7 @@ defmodule Mix.Tasks.Pleroma.Relay do
end
def run(["unfollow", target]) do
- Mix.Task.run("app.start")
+ Common.start_pleroma
with {:ok, activity} <- Relay.follow(target) do
# put this task to sleep to allow the genserver to push out the messages