diff options
| author | Mark Felder <feld@FreeBSD.org> | 2020-10-06 14:25:20 -0500 | 
|---|---|---|
| committer | Mark Felder <feld@FreeBSD.org> | 2020-10-06 14:25:20 -0500 | 
| commit | cddca85c8404272080caa661ce59ab5dbafec794 (patch) | |
| tree | aac5b9fe51b26999e2e184ddfa2b4829f33794a5 /lib/mix/tasks | |
| parent | ba7f9459b4798388eb4e441d096302c018354033 (diff) | |
| parent | 2698bbc9f63d0bfd59de182d361db03d54aa2a68 (diff) | |
| download | pleroma-cddca85c8404272080caa661ce59ab5dbafec794.tar.gz pleroma-cddca85c8404272080caa661ce59ab5dbafec794.zip  | |
Merge branch 'develop' into revert/rich-media-censorship
Diffstat (limited to 'lib/mix/tasks')
| -rw-r--r-- | lib/mix/tasks/pleroma/relay.ex | 13 | 
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/mix/tasks/pleroma/relay.ex b/lib/mix/tasks/pleroma/relay.ex index a6d8d6c1c..bb808ca47 100644 --- a/lib/mix/tasks/pleroma/relay.ex +++ b/lib/mix/tasks/pleroma/relay.ex @@ -21,10 +21,19 @@ defmodule Mix.Tasks.Pleroma.Relay do      end    end -  def run(["unfollow", target]) do +  def run(["unfollow", target | rest]) do      start_pleroma() -    with {:ok, _activity} <- Relay.unfollow(target) do +    {options, [], []} = +      OptionParser.parse( +        rest, +        strict: [force: :boolean], +        aliases: [f: :force] +      ) + +    force = Keyword.get(options, :force, false) + +    with {:ok, _activity} <- Relay.unfollow(target, %{force: force}) do        # put this task to sleep to allow the genserver to push out the messages        :timer.sleep(500)      else  | 
