Skip to content

Conversation

@pory-gone
Copy link
Contributor

@pory-gone pory-gone commented Dec 12, 2025

Description

fix #2438

Added satsFilter check to push notification queries.
Changes:

  • Added satsFilterClause() helper function that replicates the logic from investmentClause in item.js
    -Modified notifyUserSubscribers, notifyTerritorySubscribers, notifyThreadSubscribers, notifyItemParents, notifyMention, and notifyItemMention to filter based on satsFilter directly 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.

@pory-gone pory-gone changed the title draft: filter push notifications using satsFilterClause in SQL WIP: filter push notifications using satsFilterClause in SQL Dec 12, 2025
@pory-gone pory-gone changed the title WIP: filter push notifications using satsFilterClause in SQL Filter push notifications using satsFilterClause in SQL Dec 13, 2025
@pory-gone pory-gone marked this pull request as ready for review December 13, 2025 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

push notifications don't respect sats filter

1 participant