diff options
author | ThibG <thib@sitedethib.com> | 2020-12-22 17:14:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-22 17:14:32 +0100 |
commit | 1cf2c3a810bba937c7702c342a3ff37c3d37391a (patch) | |
tree | 5e63fbb9e8b975c3b22f84a04ae61e8d6bdf0df7 /lib/mastodon/accounts_cli.rb | |
parent | 9915d11c0d7a15b6775af8e78fcc4d836368f88d (diff) |
Fix external user creation failing when invite request text is required (#15405)
* Fix external user creation failing when invite request text is required Also fixes tootctl-based user creation. * Add test about invites when invite request text is otherwise required Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'lib/mastodon/accounts_cli.rb')
-rw-r--r-- | lib/mastodon/accounts_cli.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mastodon/accounts_cli.rb b/lib/mastodon/accounts_cli.rb index 5275f04cf..cdd1db995 100644 --- a/lib/mastodon/accounts_cli.rb +++ b/lib/mastodon/accounts_cli.rb @@ -77,7 +77,7 @@ module Mastodon def create(username) account = Account.new(username: username) password = SecureRandom.hex - user = User.new(email: options[:email], password: password, agreement: true, approved: true, admin: options[:role] == 'admin', moderator: options[:role] == 'moderator', confirmed_at: options[:confirmed] ? Time.now.utc : nil) + user = User.new(email: options[:email], password: password, agreement: true, approved: true, admin: options[:role] == 'admin', moderator: options[:role] == 'moderator', confirmed_at: options[:confirmed] ? Time.now.utc : nil, bypass_invite_request_check: true) if options[:reattach] account = Account.find_local(username) || Account.new(username: username) |