Filter push notifications using satsFilterClause in SQL
Description
fix #2438
Added satsFilter check to push notification queries.
Changes:
- Added
satsFilterClause()helper function that replicates the logic frominvestmentClauseinitem.js-ModifiednotifyUserSubscribers,notifyTerritorySubscribers,notifyThreadSubscribers,notifyItemParents,notifyMention, andnotifyItemMentionto filter based onsatsFilterdirectly in the SQL queryy
Screenshots
N/A
Additional Context
The filter is applied at the SQL query level rather than in sendUserNotification to ensure the filter is applied before notification.itemId is deleted.
I haven't been able to test properly with the freebies since they've been disabled, but tests show the filter works.
Checklist
Are your changes backward compatible? Please answer below: Yes
On a scale of 1-10 how well and how have you QA'd this change and any features it might affect? Please answer below: 7/10
For frontend changes: Tested on mobile, light and dark mode? Please answer below: NaN
Did you introduce any new environment variables? If so, call them out explicitly here: NaN
Did you use AI for this? If so, how much did it assist you? AI helped me with a detailed explanation of the code and a testing plan to verify that the changes worked correctly.