Merge branch 'relay-actor-type' of https://git.pleroma.social/mkljczk/pleroma into relay-actor-type

This commit is contained in:
marcin mikołajczak 2023-09-07 15:10:27 +02:00
commit 651251de2a

View file

@ -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 = Repo.get_by(User, nickname: "relay")
if relay != nil and User.invisible?(relay) do
relay
|> Ecto.Changeset.change(actor_type: "Application")
|> Repo.update()
end
end
end