mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-06-02 13:29:25 +00:00
Merge branch 'relay-actor-type' of https://git.pleroma.social/mkljczk/pleroma into relay-actor-type
This commit is contained in:
commit
651251de2a
|
@ -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
|
Loading…
Reference in a new issue