PERF: remove "new posts" stat from summary email

It performs horribly and isn't a personalized stat like the others.
This commit is contained in:
Neil Lalonde 2019-05-15 16:28:16 -04:00
parent db89722a98
commit 7eea55d564
1 changed files with 0 additions and 5 deletions

View File

@ -230,11 +230,6 @@ class UserNotifications < ActionMailer::Base
@counts << { label_key: 'user_notifications.digest.liked_received', value: value, href: "#{Discourse.base_url}/my/notifications" } if value > 0 @counts << { label_key: 'user_notifications.digest.liked_received', value: value, href: "#{Discourse.base_url}/my/notifications" } if value > 0
end end
if @counts.size < 3
value = Post.for_mailing_list(user, min_date).where("posts.post_number > ?", 1).count
@counts << { label_key: 'user_notifications.digest.new_posts', value: value, href: "#{Discourse.base_url}/new" } if value > 0
end
if @counts.size < 3 if @counts.size < 3
value = User.real.where(active: true, staged: false).not_suspended.where("created_at > ?", min_date).count value = User.real.where(active: true, staged: false).not_suspended.where("created_at > ?", min_date).count
@counts << { label_key: 'user_notifications.digest.new_users', value: value, href: "#{Discourse.base_url}/about" } if value > 0 @counts << { label_key: 'user_notifications.digest.new_users', value: value, href: "#{Discourse.base_url}/about" } if value > 0