* Parse internal refs to links
* Item mention notifications
* Also parse item mentions as URLs
* Fix subType determined by referrer item instead of referee item
* Ignore subType
Considering if the item that was referred to was a post or comment made the code more complex than initially necessary.
For example, notifications for /notifications are deduplicated based on item id and the same item could refer to posts and comments, so to include "one of your posts" or "one of your comments" in the title would require splitting notifications based on the type of referred item.
I didn't want to do this but also wanted to have consistent notification titles between push and /notifications, so I use "items" in both places now, even though I think using "items" isn't ideal from a user perspective. I think it might be confusing.
* Fix rootText
* Replace full links to #<id> syntax in push notifications
* Refactor mention code into separate functions
* @remindme bot support
support reminders via @remindme bot, just like @delete bot
* minor cleanup
* minor query cleanup
* add db migration
* various fixes and updates:
* hasNewNotes implementation
* actually return notification component in ui
* delete reminder and job on item delete
* other goodies
* refactor to use prisma for deleting existing reminder
* * switch to deleteMany to delete existing Reminders upon edit/delete of post to satisfy prisma
* update wording in form toast for remindme bot usage
* update wording in the push notification sent
* transactional reminder inserts and expirein
* set expirein on @delete too
---------
Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
* honor mutes when sending push notifications for:
* territory subscriptions
* mentions
* user subscriptions
Also, don't allow you to mute a subscribed user, or vice versa
* refactor mute detection for more code reuse
update mute/subscribe error messages for consistency
* variable rename
* move `isMuted` to shared user lib, reuse in user resolver and webpush
* update awards.csv
---------
Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>