* make polls anonymous
Introduce a `PollBlindVote` DB table that tracks when a user votes in a poll,
but does not track which choice they made.
Alter the `PollVote` DB table to remove the `userId` column, meaning `PollVote`
now tracks poll votes anonymously - it captures votes per poll option,
but does not track which user submitted the vote.
Update the `poll_vote` DB function to work with both tables now.
Update the `item.poll` resolver to calculate `meVoted` based on the `PollBlindVote`
table instead of `PollVote`.
* remove `meVoted` on `PollOption`s
---------
Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
* 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
* Replace useInvoiceable with usePayment hook
* Show WebLnError in QR code fallback
* Fix missing removal of old zap undo code
* Fix payment timeout message
* Fix unused arg in super()
* Also bail if invoice expired
* Fix revert on reply error
* Use JIT_INVOICE_TIMEOUT_MS constant
* Remove unnecessary PaymentContext
* Fix me as a dependency in FeeButtonContext
* Fix anon sats added before act success
* Optimistic updates for zaps
* Fix modal not closed after custom zap
* Optimistic update for custom zaps
* Optimistic update for bounty payments
* Consistent error handling for zaps and bounty payments
* Optimistic update for poll votes
* Use var balance in payment.request
* Rename invoiceable to prepaid
* Log cancelled invoices
* Client notifications
We now show notifications that are stored on the client to inform the user about following errors in the prepaid payment flow:
- if a payment fails
- if an invoice expires before it is paid
- if a payment was interrupted (for example via page refresh)
- if the action fails after payment
* Remove unnecessary passing of act
* Use AbortController for zap undos
* Fix anon zap update not updating bolt color
* Fix zap counted towards anon sats even if logged in
* Fix duplicate onComplete call
* Fix downzap type error
* Fix "missing field 'path' while writing result" error
* Pass full item in downzap props
The previous commit fixed cache updates for downzaps but then the cache update for custom zaps failed because 'path' wasn't included in the server response.
This commit is the proper fix.
* Parse lnc rpc error messages
* Add hash to InvoiceExpiredError
* Render Rumble video in preview and posts
* Display Rumble video
* Remove workspace
* Add util function
* Use searchParam for id
* Update check for Rumble
* Update youtube match strings
* fix hostname conditions
---------
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
* @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>