rename mix task: pleroma.user unsubscribe -> pleroma.user deactivate
This commit is contained in:
parent
63477d07ad
commit
9bc5e18ade
3 changed files with 16 additions and 17 deletions
|
|
@ -144,7 +144,7 @@ defmodule Mix.Tasks.Pleroma.User do
|
|||
end
|
||||
end
|
||||
|
||||
def run(["unsubscribe", nickname]) do
|
||||
def run(["deactivate", nickname]) do
|
||||
start_pleroma()
|
||||
|
||||
with %User{} = user <- User.get_cached_by_nickname(nickname) do
|
||||
|
|
@ -163,7 +163,7 @@ defmodule Mix.Tasks.Pleroma.User do
|
|||
end
|
||||
end
|
||||
|
||||
def run(["unsubscribe_all_from_instance", instance]) do
|
||||
def run(["deactivate_all_from_instance", instance]) do
|
||||
start_pleroma()
|
||||
|
||||
Pleroma.User.Query.build(%{nickname: "@#{instance}"})
|
||||
|
|
@ -171,7 +171,7 @@ defmodule Mix.Tasks.Pleroma.User do
|
|||
|> Stream.each(fn users ->
|
||||
users
|
||||
|> Enum.each(fn user ->
|
||||
run(["unsubscribe", user.nickname])
|
||||
run(["deactivate", user.nickname])
|
||||
end)
|
||||
end)
|
||||
|> Stream.run()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue