Add :allow_see_participants in group/actor - #687

This commit is contained in:
Laurent GAY
2025-11-11 12:03:21 +01:00
committed by setop
parent 6b558e5301
commit 8116f03ebf
6 changed files with 87 additions and 5 deletions

View File

@@ -7,6 +7,12 @@ defmodule Mobilizon.Storage.Repo.Migrations.RepairGroupsWithMissingURLs do
def up do
Actor
|> where([a], a.type == :Group and is_nil(a.domain))
|> select(
[a],
{a.id, a.url, a.outbox_url, a.inbox_url, a.following_url, a.followers_url,
a.shared_inbox_url, a.members_url, a.resources_url, a.posts_url, a.events_url, a.todos_url,
a.discussions_url, a.type, a.name, a.domain}
)
|> Repo.all()
|> Enum.each(&fix_group/1)
end

View File

@@ -0,0 +1,9 @@
defmodule Mobilizon.Storage.Repo.Migrations.AddAllowToGroup do
use Ecto.Migration
def change do
alter table("actors") do
add(:allow_see_participants, :boolean, default: false, null: false)
end
end
end