Skip to content

Commit 0033ce9

Browse files
Gargronhiyuki2578
authored andcommitted
Don't count suspended users in user count (mastodon#9380)
Fix mastodon#7637
1 parent a181061 commit 0033ce9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/presenters/instance_presenter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def contact_account
1818
end
1919

2020
def user_count
21-
Rails.cache.fetch('user_count') { User.confirmed.count }
21+
Rails.cache.fetch('user_count') { User.confirmed.joins(:account).merge(Account.without_suspended).count }
2222
end
2323

2424
def status_count

0 commit comments

Comments
 (0)