stacker.news/worker
SatsAllDay d7ecbbae3a
Search bookmarks (#1075)
* Support `is:bookmarked` search option to search my bookmarked items

* Update the worker search module to include `bookmarkedBy: Array<Number>` which
contains the list of user ids which have bookmarked a given item

* Add a trigger on the `Bookmark` DB table to re-index the corresponding item when
a bookmark is added/removed

* Update the Search resolver to check for a `is:bookmarked` query option. If provided,
include it as an option in the search request. This updates search to look for items
which are bookmarked by the current user. By default, this preserves stacker privacy
so you can only search your own bookmarks

* Update the search page UI to show how to invoke searching your own bookmarks

* undo `is:bookmarked` support, add `bookmarks` item in search select

* short circuit return empty payload for anon requesting bookmarks

* remove console.log for debugging

* fix indexing a new item that has yet to be bookmarked

* update db migration to re-index all existing bookmarked items one time

* fix the case where deleting a bookmark doesn't trigger a new index of items

explictly specify a `updatedAt` value when deleting a bookmark, to ensure that
deleting a bookmark results in a new indexed version of the bookmarked item

* update search indexer to use the latest of all three choices for the latest version

* give bookmark index jobs longer expiration

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
2024-04-19 13:24:48 -05:00
..
Dockerfile add sndev shell script and enhance docker compose local dev 2024-03-13 09:04:09 -05:00
auction.js Merge serializeInvoiceable with serialize without bug (#1051) 2024-04-09 19:49:20 -05:00
autowithdraw.js Fix autowithdrawal logs (#1073) 2024-04-16 13:59:46 -05:00
deleteUnusedImages.js Use module path aliases (#938) 2024-03-19 19:37:31 -05:00
earn.js Merge serializeInvoiceable with serialize without bug (#1051) 2024-04-09 19:49:20 -05:00
ephemeralItems.js Use module path aliases (#938) 2024-03-19 19:37:31 -05:00
imgproxy.js Use module path aliases (#938) 2024-03-19 19:37:31 -05:00
index.js Monthly rewards (#890) 2024-03-01 10:28:55 -06:00
nostr.js Rename HODL to JIT in frontend comments (#843) 2024-02-16 12:27:15 -06:00
ofac.js Use module path aliases (#938) 2024-03-19 19:37:31 -05:00
ots.js territories 2023-12-04 21:34:06 -06:00
package.json Convert worker to ESM (#500) 2023-09-23 20:19:35 -05:00
repin.js territories 2023-12-04 21:34:06 -06:00
search.js Search bookmarks (#1075) 2024-04-19 13:24:48 -05:00
streak.js Use module path aliases (#938) 2024-03-19 19:37:31 -05:00
territory.js Merge serializeInvoiceable with serialize without bug (#1051) 2024-04-09 19:49:20 -05:00
trust.js Use module path aliases (#938) 2024-03-19 19:37:31 -05:00
views.js Monthly rewards (#890) 2024-03-01 10:28:55 -06:00
wallet.js Fix autowithdrawal logs (#1073) 2024-04-16 13:59:46 -05:00