A platform for community discussion. Free, open, simple.
DEV: group all collapsed notifications
Régis Hanol2988d281fc87
diff --git a/app/services/post_alerter.rb b/app/services/post_alerter.rbindex a702efde7bf..1ee5a839d75 100644--- a/app/services/post_alerter.rb+++ b/app/services/post_alerter.rb@@ -271,6 +271,7 @@ class PostAlerterNotification.types[:replied],Notification.types[:quoted],Notification.types[:posted],+ Notification.types[:private_message],]def create_notification(user, type, post, opts = {})@@ -341,13 +342,8 @@ class PostAlertercollapsed = trueend- if type == Notification.types[:private_message]- destroy_notifications(user, type, post.topic)- collapsed = true- end-original_post = post- original_username = opts[:display_username] || post.username # xxxxx need something here too+ original_username = opts[:display_username].presence || post.usernameif collapsedpost = first_unread_post(user, post.topic) || post