From affbb10566fd4388f5b761cc66857be15fd010eb Mon Sep 17 00:00:00 2001 From: Claire Date: Fri, 23 Feb 2024 20:04:57 +0100 Subject: [PATCH] Fix admin account created by `mastodon:setup` not being auto-approved (#29379) --- lib/tasks/mastodon.rake | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/tasks/mastodon.rake b/lib/tasks/mastodon.rake index 1184e5273..8c6c4be89 100644 --- a/lib/tasks/mastodon.rake +++ b/lib/tasks/mastodon.rake @@ -516,6 +516,7 @@ namespace :mastodon do owner_role = UserRole.find_by(name: 'Owner') user = User.new(email: email, password: password, confirmed_at: Time.now.utc, account_attributes: { username: username }, bypass_invite_request_check: true, role: owner_role) user.save(validate: false) + user.approve! Setting.site_contact_username = username