From 708fc9e2a1a253edff4058eec2bb1929d5687e68 Mon Sep 17 00:00:00 2001 From: Molly Struve Date: Fri, 9 Jul 2021 17:57:14 -0400 Subject: [PATCH] Filter by user IDs when sending comment notifications (#14186) --- app/services/notifications/new_comment/send.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/notifications/new_comment/send.rb b/app/services/notifications/new_comment/send.rb index 0d495608b..b51335050 100644 --- a/app/services/notifications/new_comment/send.rb +++ b/app/services/notifications/new_comment/send.rb @@ -36,7 +36,7 @@ module Notifications # Send PNs using Rpush - respecting users' notificaton delivery settings targets = User.joins(:notification_setting) - .where(notification_setting: { mobile_comment_notifications: true }).ids + .where(id: user_ids, notification_setting: { mobile_comment_notifications: true }).ids PushNotifications::Send.call( user_ids: targets,