stacker.news/api/resolvers
SatsAllDay 906571324a
De-dupe item-driven notifications (#457)
* De-dupe item-driven notifications

Update how we query for item-driven notifications to de-dupe them for:

1. mentions
2. replies
3. thread subscriptions
4. user subscriptions

users should recieve only 1 notification for any given item created by another user, following the above priority order

this is accomplished by querying for replies to current user, replies on subscribed threads, items from subscribed users, and mentions (if enabled for the current user), sorting those results by item id and priority order within item id based on notification type, then selecting the highest priority notification from each item id

these results are then union all'ed with all other notification types, unchanged.

* remove extra union hashing

---------

Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
2023-08-30 20:38:31 -05:00
..
imgproxy isimage fetch timeout 2023-08-27 13:28:33 -05:00
admin.js snl live banner 2023-06-20 09:57:06 -05:00
growth.js add average comments per post to items analytics 2023-08-14 15:36:54 -05:00
index.js upgrade to prisma 4 2023-07-26 19:18:42 -05:00
invite.js upgrade to prisma 4 2023-07-26 19:18:42 -05:00
item.js Subscribe to a user (#443) 2023-08-28 20:27:56 -05:00
lnurl.js remove slashtags completely 2023-08-17 13:40:21 -05:00
message.js Revert "Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades"" 2023-07-23 10:08:43 -05:00
notifications.js De-dupe item-driven notifications (#457) 2023-08-30 20:38:31 -05:00
price.js require sub selection, allow editting 2023-05-10 19:30:51 -05:00
referrals.js upgrade to prisma 4 2023-07-26 19:18:42 -05:00
rewards.js handle some rewards corner cases 2023-08-30 10:00:47 -05:00
search.js Revert "Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades"" 2023-07-23 10:08:43 -05:00
serial.js Allow zapping, posting and commenting without funds or an account (#336) 2023-08-11 18:50:57 -05:00
sub.js Revert "Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades"" 2023-07-23 10:08:43 -05:00
upload.js Revert "Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades"" 2023-07-23 10:08:43 -05:00
user.js Subscribe to a user (#443) 2023-08-28 20:27:56 -05:00
wallet.js Fix expireSecs ignored for anons (#447) 2023-08-28 07:08:29 -05:00