FIX: Liked notifications should not be consolidated across multiple users.

This commit is contained in:
Guo Xiang Tan
2019-01-16 15:01:13 +08:00
parent 71a69c1976
commit 27e2b6575b
2 changed files with 22 additions and 2 deletions
+7 -2
View File
@@ -89,9 +89,14 @@ class PostActionNotifier
user_liked_consolidated_notification =
user_notifications
.where(
"created_at > ? AND notification_type = ?",
"
created_at > ? AND
notification_type = ? AND
data::json ->> 'display_username' = ?
",
consolidation_window,
Notification.types[:liked_consolidated]
Notification.types[:liked_consolidated],
post_action.user.username_lower
)
.first