Make sure relay and anonymous actors don't automatically approve

followers

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-05-12 11:02:46 +02:00
parent 938f698b7a
commit 628c55cd84
2 changed files with 30 additions and 13 deletions

View File

@@ -0,0 +1,15 @@
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