From 2ec45549cf42bacd233599b50cf3e720e1c6b547 Mon Sep 17 00:00:00 2001 From: Daniel M Brasil Date: Sun, 30 Apr 2023 01:50:58 -0300 Subject: [PATCH] Fix `tootctl accounts approve --number N` not aproving N earliest registrations (#24605) --- lib/mastodon/accounts_cli.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mastodon/accounts_cli.rb b/lib/mastodon/accounts_cli.rb index ebfb609791..43269334a5 100644 --- a/lib/mastodon/accounts_cli.rb +++ b/lib/mastodon/accounts_cli.rb @@ -545,7 +545,7 @@ module Mastodon User.pending.find_each(&:approve!) say('OK', :green) elsif options[:number]&.positive? - User.pending.limit(options[:number]).each(&:approve!) + User.pending.order(created_at: :asc).limit(options[:number]).each(&:approve!) say('OK', :green) elsif username.present? account = Account.find_local(username)