PERF: remove "new posts" stat from summary email

approved
#1

PERF: remove “new posts” stat from summary email

It performs horribly and isn’t a personalized stat like the others.

diff --git a/app/mailers/user_notifications.rb b/app/mailers/user_notifications.rb
index bc18284..d1bf281 100644
--- a/app/mailers/user_notifications.rb
+++ b/app/mailers/user_notifications.rb
@@ -231,11 +231,6 @@ class UserNotifications < ActionMailer::Base
       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
       end

GitHub sha: 7eea55d5

1 Like
Remove unused translation
#2

I did a quick search but it doesn’t seem like the translation key is being used anymore.

3 Likes
Followed Up #3

Remove unused translation

Approved #4