Commit 8e28e8a1 authored by kaniini's avatar kaniini Committed by kaniini
Browse files

mix: remove fix_ap_users task, now obsolete

parent 200ab27e
Pipeline #3804 passed with stages
in 5 minutes and 37 seconds
defmodule Mix.Tasks.FixApUsers do
use Mix.Task
import Ecto.Query
alias Pleroma.{Repo, User}
@shortdoc "Grab all ap users again"
def run([]) do
Mix.Task.run("app.start")
q =
from(
u in User,
where: fragment("? @> ?", u.info, ^%{"ap_enabled" => true}),
where: u.local == false
)
users = Repo.all(q)
Enum.each(users, fn user ->
try do
IO.puts("Fetching #{user.nickname}")
Pleroma.Web.ActivityPub.Transmogrifier.upgrade_user_from_ap_id(user.ap_id, false)
rescue
e -> IO.inspect(e)
end
end)
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment