From 7eea55d564e8f1a7202a078363628c7ba973dbd3 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Wed, 15 May 2019 16:28:16 -0400 Subject: [PATCH] PERF: remove "new posts" stat from summary email It performs horribly and isn't a personalized stat like the others. --- app/mailers/user_notifications.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/mailers/user_notifications.rb b/app/mailers/user_notifications.rb index bc182849d5..d1bf28124f 100644 --- a/app/mailers/user_notifications.rb +++ b/app/mailers/user_notifications.rb @@ -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 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 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