Auto accept account added to collection (#37805)

This commit is contained in:
David Roetzel
2026-02-10 13:48:28 +01:00
committed by GitHub
parent 75ba314e6b
commit ae30c40335

View File

@@ -27,7 +27,7 @@ class CreateCollectionService
@accounts_to_add.each do |account_to_add|
raise Mastodon::NotPermittedError, I18n.t('accounts.errors.cannot_be_added_to_collections') unless AccountPolicy.new(@account, account_to_add).feature?
@collection.collection_items.build(account: account_to_add)
@collection.collection_items.build(account: account_to_add, state: :accepted)
end
end