FIX: Change user digest email total unread notification calculation (#9648)

FIX: Change user digest email total unread notification calculation (#9648)

We now add together unread notifications (which are low-priority only) and unread high priority notifications (PMs and bookmark reminder notifications), and removed the separate “X unread high priority notifications” count in the user digest email.

diff --git a/app/mailers/user_notifications.rb b/app/mailers/user_notifications.rb
index 7b35e9b..d1e883f 100644
--- a/app/mailers/user_notifications.rb
+++ b/app/mailers/user_notifications.rb
@@ -213,12 +213,12 @@ class UserNotifications < ActionMailer::Base
                    value: new_topics_count,
                    href: "#{Discourse.base_url}/new" }]
 
-      value = user.unread_notifications
+      # totalling unread notifications (which are low-priority only) and unread
+      # PMs and bookmark reminder notifications, so the total is both unread low
+      # and high priority PMs
+      value = user.unread_notifications + user.unread_high_priority_notifications
       @counts << { label_key: 'user_notifications.digest.unread_notifications', value: value, href: "#{Discourse.base_url}/my/notifications" } if value > 0
 
-      value = user.unread_high_priority_notifications
-      @counts << { label_key: 'user_notifications.digest.unread_high_priority', value: value, href: "#{Discourse.base_url}/my/notifications" } if value > 0
-
       if @counts.size < 3
         value = user.unread_notifications_of_type(Notification.types[:liked])
         @counts << { label_key: 'user_notifications.digest.liked_received', value: value, href: "#{Discourse.base_url}/my/notifications" } if value > 0

GitHub sha: 4239ca1f

This commit appears in #9648 which was merged by martin.