mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-05-19 18:18:07 +00:00
Add migration for relay actor type
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
2113b28f69
commit
533928fd96
|
@ -0,0 +1,20 @@
|
|||
# Pleroma: A lightweight social networking server
|
||||
# Copyright © 2017-2023 Pleroma Authors <https://pleroma.social/>
|
||||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
defmodule Pleroma.Repo.Migrations.ChangeRelayActorType do
|
||||
use Ecto.Migration
|
||||
|
||||
alias Pleroma.Repo
|
||||
alias Pleroma.User
|
||||
|
||||
def change do
|
||||
relay = User.get_by_nickname("relay")
|
||||
|
||||
if relay != nil and User.invisible?(relay) do
|
||||
relay
|
||||
|> Ecto.Changeset.change(actor_type: "Application")
|
||||
|> Repo.update()
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue