mobilizon.chapril.org-mobil.../priv/repo/migrations/20210512084824_repair_relay_and_anonymous_actors.exs
Thomas Citharel 628c55cd84
Make sure relay and anonymous actors don't automatically approve
followers

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-06-04 13:33:14 +02:00

16 lines
488 B
Elixir

defmodule Mobilizon.Storage.Repo.Migrations.RepairRelayAndAnonymousActors do
use Ecto.Migration
def up do
Ecto.Adapters.SQL.query!(
Mobilizon.Storage.Repo,
"UPDATE actors SET manually_approves_followers = true WHERE preferred_username = 'relay' and domain is null"
)
Ecto.Adapters.SQL.query!(
Mobilizon.Storage.Repo,
"UPDATE actors SET manually_approves_followers = true WHERE preferred_username = 'anonymous' and domain is null"
)
end
end