mirror of
https://github.com/discourse/discourse.git
synced 2026-09-05 04:40:41 -05:00
Merge pull request #5428 from discourse/fix-pending-users-count
FIX: incorrect pending_users_reminder user count
This commit is contained in:
@@ -22,13 +22,13 @@ module Jobs
|
||||
target_usernames = Group[:moderators].users.map do |user|
|
||||
next if user.id < 0
|
||||
|
||||
count = user.notifications.joins(:topic)
|
||||
unseen_count = user.notifications.joins(:topic)
|
||||
.where("notifications.id > ?", user.seen_notification_id)
|
||||
.where("notifications.read = false")
|
||||
.where("topics.subtype = ?", TopicSubtype.pending_users_reminder)
|
||||
.count
|
||||
|
||||
count == 0 ? user.username : nil
|
||||
unseen_count == 0 ? user.username : nil
|
||||
end.compact
|
||||
|
||||
unless target_usernames.empty?
|
||||
|
||||
Reference in New Issue
Block a user