From 0714f1c440fa1c4e6b72160ae94b105f80b9c851 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Tue, 23 Feb 2021 10:59:02 -0600 Subject: [PATCH] Pleroma user.rm mix task should also call User.delete/1 --- lib/mix/tasks/pleroma/user.ex | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/mix/tasks/pleroma/user.ex b/lib/mix/tasks/pleroma/user.ex index 53d5fc6d9..e3351f0f2 100644 --- a/lib/mix/tasks/pleroma/user.ex +++ b/lib/mix/tasks/pleroma/user.ex @@ -8,8 +8,6 @@ defmodule Mix.Tasks.Pleroma.User do alias Ecto.Changeset alias Pleroma.User alias Pleroma.UserInviteToken - alias Pleroma.Web.ActivityPub.Builder - alias Pleroma.Web.ActivityPub.Pipeline @shortdoc "Manages Pleroma users" @moduledoc File.read!("docs/administration/CLI_tasks/user.md") @@ -98,9 +96,8 @@ defmodule Mix.Tasks.Pleroma.User do def run(["rm", nickname]) do start_pleroma() - with %User{local: true} = user <- User.get_cached_by_nickname(nickname), - {:ok, delete_data, _} <- Builder.delete(user, user.ap_id), - {:ok, _delete, _} <- Pipeline.common_pipeline(delete_data, local: true) do + with %User{local: true} = user <- User.get_cached_by_nickname(nickname) do + User.delete(user) shell_info("User #{nickname} deleted.") else _ -> shell_error("No local user #{nickname}")