Commit Graph

623 Commits

Author SHA1 Message Date
rleed 2ba969ebab
Add new visitor welcome banner (#418)
* add new visitor welcome banner

* show dismissible banner on first-time login

* add mutation to hide welcome banner

* Update components/banners.js

Co-authored-by: ekzyis <27162016+ekzyis@users.noreply.github.com>

* fix error handling

* simplifications and other review suggestions

* cleanup

* restore selective display logic

* remove unnecessary query arguments

* cleanup a bit more

* don't show welcome banner to existing stackers

---------

Co-authored-by: rleed <rleed1@pm.me>
Co-authored-by: ekzyis <27162016+ekzyis@users.noreply.github.com>
Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
2023-09-11 16:29:45 -05:00
SatsAllDay ec758b2d5f
vary push notification body for subscriptions based on whether item is post (#476) 2023-09-11 14:56:50 -05:00
keyan b7d0a373f4 don't notify for hold invoices 2023-08-31 11:38:45 -05:00
ekzyis 803acd1fc4
Replace FundError with InvoiceModal (#455)
* invoices are no longer deleted to prevent double-spends but marked as confirmed.
  therefore, during checkInvoice, we also check if the invoice is already confirmed.
* instead of showing FundError (with "fund wallet" and "pay invoice" as options), we now always immediately show an invoice
* since flagging, paying bounties and poll voting used FundError but only allowed spending from balance, they now also support paying per invoice

Co-authored-by: ekzyis <ek@stacker.news>
2023-08-31 10:10:24 -05:00
ekzyis ac45fdc234
Use HODL invoices (#432)
* Use HODL invoices

* Fix expiry check comparing string with Date

* Fix unconfirmed user balance for HODL invoices

This is done by syncing the data from LND to the Invoice table.

If the columns is_held and msatsReceived are set, the frontend is told that we're ready to execute the action.

We then update the user balance in the same tx as the action.

We need to still keep checking the invoice for expiration though.

* Fix worker acting upon deleted invoices

* Prevent usage of invoice after expiration

* Use onComplete from <Countdown> to show expired status

* Remove unused lnd argument

* Fix item destructuring from query

* Fix balance added to every stacker

* Fix hmac required

* Fix invoices not used when logged in

* refactor: move invoiceable code into form

* renamed invoiceHash, invoiceHmac to hash, hmac since it's less verbose all over the place
* form now supports `invoiceable` in its props
* form then wraps `onSubmit` with `useInvoiceable` and passes optional invoice options

* Show expired if expired and canceled

* Also use useCallback for zapping

* Always expire modal invoices after 3m

* little styling thing

---------

Co-authored-by: ekzyis <ek@stacker.news>
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
2023-08-30 21:48:49 -05:00
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
keyan 68e9dfd69c fix closure stacker bug 2023-08-30 19:03:05 -05:00
keyan faf71f744c handle some rewards corner cases 2023-08-30 10:00:47 -05:00
keyan 9a4476b1fe fix time zone problems 2023-08-29 21:05:10 -05:00
keyan b6c822f40e allow viewing reward ranges 2023-08-29 19:13:21 -05:00
keyan a40eb642a0 rewards only go to top posts/comments 2023-08-29 16:05:09 -05:00
keyan 58c1980786 break out user subscriptions 2023-08-29 14:38:00 -05:00
SatsAllDay 0d4a225442
Subscribe to a user (#443)
* First pass of user subscriptions

* add new db model to track subscriptions
* update user typedef and api resolver for subscription state
* add subscribe action to user profile page
* add mutation to subscribe to a user

* Update notifications queries, hasNewNotes queries for FollowActivity note type

* Only show items that have been created since subscribing to the user

* Send push notifications to user subscribers for posts and comments

* Rename item dropdown to action dropdown and re-use for item info and user actions

* Don't allow self-follows

* Add index on followee for faster lookups

* Don't show subscribe action if not logged in

* small style enhance

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
2023-08-28 20:27:56 -05:00
keyan 781d034422 fix top cowboy nulls 2023-08-28 20:12:33 -05:00
keyan 7bbcc86270 redirect to login on pages that require auth (#269) 2023-08-28 12:52:15 -05:00
keyan 88da287a87 hide zap bolt for forward users (#445) 2023-08-28 09:40:29 -05:00
ekzyis 4a0e615d7d
Fix TypeError during push notifications (#448)
Without this, following error is thrown when notifying users about new replies:

[webPush] error sending user notification:  TypeError: Cannot read properties of undefined (reading 'id')
app  |     at createItemUrl (webpack-internal:///(api)/./api/webPush/index.js:76:29)
app  |     at async sendUserNotification (webpack-internal:///(api)/./api/webPush/index.js:125:33)
app  |     at async Promise.allSettled (index 0)

Co-authored-by: ekzyis <ek@stacker.news>
2023-08-28 07:16:34 -05:00
ekzyis 107a7f9e77
Fix expireSecs ignored for anons (#447)
Co-authored-by: ekzyis <ek@stacker.news>
2023-08-28 07:08:29 -05:00
keyan 2e846af737 fix bio 2023-08-27 17:48:46 -05:00
keyan fda7b1b140 isimage fetch timeout 2023-08-27 13:28:33 -05:00
keyan 61c7bb28c2 allow name checking if you aren't logged in 2023-08-25 14:22:02 -05:00
keyan a847b16b2c make item creation easier 2023-08-25 13:42:55 -05:00
SatsAllDay 3da395a792
multiple forwards on a post (#403)
* multiple forwards on a post

first phase of the multi-forward support

* update the graphql mutation for discussion posts to accept and validate multiple forwards

* update the discussion form to allow multiple forwards in the UI

* start working on db schema changes

* uncomment db schema, add migration to create the new model, and update create_item, update_item
stored procedures

* Propagate updates from discussion to poll, link, and bounty forms

Update the create, update poll sql functions for multi forward support

* Update gql, typedefs, and resolver to return forwarded users in items responses

* UI changes to show multiple forward recipients, and conditional upvote logic changes

* Update notification text to reflect multiple forwards upon vote action

* Disallow duplicate stacker entries

* reduce duplication in populating adv-post-form initial values

* Update item_act sql function to implement multi-way forwarding

* Update referral functions to scale referral bonuses for forwarded users

* Update notification text to reflect non-100% forwarded sats cases

* Update wallet history sql queries to accommodate multi-forward use cases

* Block zaps for posts you are forwarded zaps at the API layer, in addition
to in the UI

* Delete fwdUserId column from Item table as part of migration

* Fix how we calculate stacked sats after partial forwards in wallet history

* Exclude entries from wallet history that are 0 stacked sats from posts with 100% forwarded to other users

* Fix wallet history query for forwarded stacked sats to be scaled by the fwd pct

* Reduce duplication in adv post form, and do some style tweaks for better layout

* Use MAX_FORWARDS constants

* Address various PR feedback

* first enhancement pass

* enhancement pass too

---------

Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
2023-08-23 17:44:17 -05:00
SatsAllDay ee3f892053
Add new user setting to hide bookmarks from other users (and anon) (#424)
* Add new setting to hide bookmarks from other users (and anon)

* Optional chaining in case user doesnt exist, and avoid duplicate sql query in some cases
2023-08-23 15:29:55 -05:00
keyan df6575d701 remove slashtags completely 2023-08-17 13:40:21 -05:00
keyan ddb69b5d9b remove slashtags temporarily 2023-08-16 19:49:00 -05:00
keyan c9a409845c configurable ranking 2023-08-16 17:53:22 -05:00
keyan 7e4a874068 update packages 2023-08-15 19:52:55 -05:00
ekzyis 7c426aa420
Enhance logging related to web push (#412)
Co-authored-by: ekzyis <ek@stacker.news>
2023-08-15 12:59:58 -05:00
ekzyis 670c567bff
Configure imgproxy timeouts + add click to load on imgproxy errors (#404)
* Configure imgproxy timeouts

* Use click to load on imgproxy errors

* Add setting for click to load

---------

Co-authored-by: ekzyis <ek@stacker.news>
2023-08-15 12:55:16 -05:00
keyan e4831e65d5 show sources and history of rewards 2023-08-15 12:41:51 -05:00
keyan 679f766f07 add average comments per post to items analytics 2023-08-14 15:36:54 -05:00
keyan 15c11efc0a add anon's earnings to reward pool 2023-08-14 14:37:09 -05:00
ekzyis b9461b7eb3
Allow zapping, posting and commenting without funds or an account (#336)
* Add anon zaps

* Add anon comments and posts (link, discussion, poll)

* Use payment hash instead of invoice id as proof of payment

Our invoice IDs can be enumerated.
So there is a - even though very rare - chance that an attacker could find a paid invoice which is not used yet and use it for himself.
Random payment hashes prevent this.

Also, since we delete invoices after use, using database IDs as proof of payments are not suitable.
If a user tells us an invoice ID after we deleted it, we can no longer tell if the invoice was paid or not since the LN node only knows about payment hashes but nothing about the database IDs.

* Allow pay per invoice for stackers

The modal which pops up if the stacker does not have enough sats now has two options: "fund wallet" and "pay invoice"

* Fix onSuccess called twice

For some reason, when calling `showModal`, `useMemo` in modal.js and the code for the modal component (here: <Invoice>) is called twice.

This leads to the `onSuccess` callback being called twice and one failing since the first one deletes the invoice.

* Keep invoice modal open if focus is lost

* Skip anon user during trust calculation

* Add error handling

* Skip 'invoice not found' errors

* Remove duplicate insufficient funds handling

* Fix insufficient funds error detection

* Fix invoice amount for comments

* Allow pay per invoice for bounty and job posts

* Also strike on payment after short press

* Fix unexpected token 'export'

* Fix eslint

* Remove unused id param

* Fix comment copy-paste error

* Rename to useInvoiceable

* Fix unexpected token 'export'

* Fix onConfirmation called at every render

* Add invoice HMAC

This prevents entities which know the invoice hash (like all LN nodes on the payment path) from using the invoice hash on SN.

Only the user which created the invoice knows the HMAC and thus can use the invoice hash.

* make anon posting less hidden, add anon info button explainer

* Fix anon users can't zap other anon users

* Always show repeat and contacts on action error

* Keep track of modal stack

* give anon an icon

* add generic date pivot helper

* make anon user's invoices expire in 5 minutes

* fix forgotten find and replace

* use datePivot more places

* add sat amounts to invoices

* reduce anon invoice expiration to 3 minutes

* don't abbreviate

* Fix [object Object] as error message

Any errors thrown here are already objects of shape { message: string }

* Fix empty invoice creation attempts

I stumbled across this while checking if anons can edit their items.

I monkey patched the code to make it possible (so they can see the 'edit' button) and tried to edit an item but I got this error:

  Variable "$amount" of required type "Int!" was not provided.

I fixed this even though this function should never be called without an amount anyway. It will return a sane error in that case now.

* anon func mods, e.g. inv limits

* anon tips should be denormalized

* remove redundant meTotalSats

* correct overlay zap text for anon

* exclude anon from trust graph before algo runs

* remove balance limit on anon

* give anon a bio and remove cowboy hat/top stackers;

* make anon hat appear on profile

* concat hash and hmac and call it a token

* Fix localStorage cleared because error were swallowed

* fix qr layout shift

* restyle fund error modal

* Catch invoice errors in fund error modal

* invoice check backoff

* anon info typo

* make invoice expiration times have saner defaults

* add comma to anon info

* use builtin copy input label

---------

Co-authored-by: ekzyis <ek@stacker.news>
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
2023-08-11 18:50:57 -05:00
keyan e913ab71ad more even rewards 2023-08-09 22:27:03 -05:00
SatsAllDay 6e05cd38f9
Singular/Plural "Sats" labels (#380)
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
2023-08-08 16:04:06 -05:00
ekzyis 67a0de3ea5
Notifications with nostr info (#368)
* Show zap message and pubkey in notifications

+ show zap request event in invoice view

* enhance ui

---------

Co-authored-by: ekzyis <ek@stacker.news>
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
2023-08-08 13:19:31 -05:00
ekzyis 4094adfa4f
Remove markdown from body in push notifications (#374)
Co-authored-by: ekzyis <ek@stacker.news>
2023-08-07 20:03:50 -05:00
ekzyis 49867f5dd5
Make web push & imgproxy setup optional for local dev (#373)
* Make web push setup optional for local dev

* Make imgproxy setup optional for local dev

---------

Co-authored-by: ekzyis <ek@stacker.news>
2023-08-07 19:53:21 -05:00
ekzyis 7369bd819d
Add nostr login (#367)
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
2023-08-07 19:50:01 -05:00
keyan ffb856ae88 fix oauth signup 2023-08-07 15:05:55 -05:00
keyan e4aaaac20f don't use cache for SSR 2023-08-05 14:46:29 -05:00
keyan f7bf77ebd4 fix BigInt Int mix in satistics 2023-07-31 12:47:41 -05:00
keyan c909efb7b7 update wallet code to prisma 5, handle prisma 5 errors on serialization 2023-07-31 08:31:40 -05:00
keyan 9745b82d63 fix viewing stacker's bookmarks 2023-07-29 18:27:32 -05:00
keyan 5232b59625 upgrade to next-auth 4 (bonus: improve error pages) 2023-07-29 14:38:20 -05:00
keyan 7542dd6cc4 upgrade to prisma 4 2023-07-26 19:18:42 -05:00
keyan 672853a7ea upgrade to prisma 3 2023-07-26 11:01:31 -05:00
keyan 8ab018af88 fix nested comment sorting 2023-07-25 19:45:35 -05:00
keyan ab2046ab0b fix issues with new linting 2023-07-25 09:14:45 -05:00
keyan e87610c45b update packages and reduce bundle size 2023-07-24 17:50:12 -05:00
keyan 54d69489b9 Revert "Revert "try to store slashtags in cwd""
This reverts commit bbedec853f.
2023-07-23 10:09:00 -05:00
keyan 437faca197 Revert "Revert "prevent slashtags from accessing disk""
This reverts commit 391773be5e.
2023-07-23 10:08:56 -05:00
keyan 59f7b6ff26 Revert "Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades""
This reverts commit 18910fa2ed.
2023-07-23 10:08:43 -05:00
keyan 18910fa2ed Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades"
This reverts commit d0314ab73c.
2023-07-23 09:16:12 -05:00
keyan 391773be5e Revert "prevent slashtags from accessing disk"
This reverts commit 3c6c2a72b2.
2023-07-23 09:16:02 -05:00
keyan bbedec853f Revert "try to store slashtags in cwd"
This reverts commit 589d1ec190.
2023-07-23 09:15:40 -05:00
keyan 589d1ec190 try to store slashtags in cwd 2023-07-21 20:14:37 -05:00
keyan 3c6c2a72b2 prevent slashtags from accessing disk 2023-07-21 20:05:04 -05:00
keyan d0314ab73c shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades 2023-07-21 17:33:11 -05:00
ekzyis 8536660580
Fix maxStreak for users with running best streak (#356)
Co-authored-by: ekzyis <ek@stacker.news>
2023-07-14 10:49:16 -05:00
keyan 3c711b6083 enhance image detection and proxy 2023-07-13 15:18:04 -05:00
ekzyis 0d3328e509
Show longest cowboy streak in profile (#353)
* Show longest cowboy streak in profile

* Fix image offset

* Initialize maxStreak for every user

* Use resolver instead of denormalization for maxStreak

---------

Co-authored-by: ekzyis <ek@stacker.news>
2023-07-12 19:10:29 -05:00
Jo Wo bf4b8714fe
Render images without markdown and use image proxy (#245)
* Parse image links during markdown rendering

* Use imgproxy to replace links

* Add healthcheck

See https://docs.imgproxy.net/healthcheck

* Enable WebP and animation support

* Only replace image URLs

* Replace all occurrences

* Fix creating posts with no text

* Embed image on link posts where link is image

---------

Co-authored-by: ekzyis <ek@stacker.news>
2023-07-12 19:10:01 -05:00
keyan 4e9138dfdc show more info on where zap rewards came from 2023-07-09 12:21:11 -05:00
ekzyis 5e4dedad28
Add nym in reply notification (#349)
Co-authored-by: ekzyis <ek@stacker.news>
2023-07-07 08:45:44 -05:00
ekzyis 46014d0de4
Fix query for items with less than 11 parents (#346)
Co-authored-by: ekzyis <ek@stacker.news>
2023-07-06 20:17:12 -05:00
keyan 0c51309520 enhance pwa presentation 2023-07-06 16:53:48 -05:00
ekzyis 37e70f9791
Scroll to items on push notification click (#345)
* Scroll from root item in reach on notification click

Instead of going directly to the item of the notification, we now scroll from the root item which is still in reach to the comment.

This should provide more context to the user in most cases.

* Also scroll from root item in reach in /notifications

---------

Co-authored-by: ekzyis <ek@stacker.news>
2023-07-06 10:00:38 -05:00
keyan a17b4d1f1a refine push notification ui and catch promises 2023-07-04 17:19:59 -05:00
ekzyis 388e00dd04
Service worker rework, Web Target Share API & Web Push API (#324)
* npm uninstall next-pwa

next-pwa was last updated in August 2022.
There is also an issue which mentions that next-pwa is abandoned (?): https://github.com/shadowwalker/next-pwa/issues/482

But the main reason for me uninstalling it is that it adds a lot of preconfigured stuff which is not necessary for us.
It even lead to a bug since pages were cached without our knowledge.

So I will go with a different PWA approach. This different approach should do the following:
- make it more transparent what the service worker is doing
- gives us more control to configure the service worker and thus making it easier

* Use workbox-webpack-plugin

Every other plugin (`next-offline`, `next-workbox-webpack-plugin`, `next-with-workbox`, ...) added unnecessary configuration which felt contrary to how PWAs should be built.
(PWAs should progressivly enhance the website in small steps, see https://web.dev/learn/pwa/getting-started/#focus-on-a-feature)

These default configurations even lead to worse UX since they made invalid assumptions about stacker.news:
We _do not_ want to cache our start url and we _do not_ want to cache anything unless explicitly told to.
Almost every page on SN should be fresh for the best UX.

To achieve this, by default, the service worker falls back to the network (as if the service worker wasn't there).

Therefore, this should be the simplest configuration with a valid precache and cache busting support.

In the future, we can try to use prefetching to improve performance of navigation requests.

* Add support for Web Share Target API

See https://developer.chrome.com/articles/web-share-target/

* Use Web Push API for push notifications

I followed this (very good!) guide: https://web.dev/notifications/

* Refactor code related to Web Push

* Send push notification to users on events

* Merge notifications

* Send notification to author of every parent recursively

* Remove unused userId param in savePushSubscription

As it should be, the user id is retrieved from the authenticated user in the backend.

* Resubscribe user if push subscription changed

* Update old subscription if oldEndpoint was given

* Allow users to unsubscribe

* Use LTREE operator instead of recursive query

* Always show checkbox for push notifications

* Justify checkbox to end

* Update title of first push notification

* Fix warning from uncontrolled to controlled

* Add comment about Notification.requestPermission

* Fix timestamp

* Catch error on push subscription toggle

* Wrap function bodies in try/catch

* Use Promise.allSettled

* Filter subscriptions by user notification settings

* Fix user notification filter

* Use skipWaiting

---------

Co-authored-by: ekzyis <ek@stacker.news>
2023-07-04 14:36:07 -05:00
keyan 747371a4e4 snl live banner 2023-06-20 09:57:06 -05:00
keyan 3e4161ae8c tip -> zap 2023-06-19 13:21:55 -05:00
keyan f0f51438c4 add top posts/comments to subs 2023-06-12 19:40:18 -05:00
keyan 369bd82a84 make freebie comments visible case by case 2023-06-03 20:01:50 -05:00
keyan d815cae715 add 'stacking since' to profile 2023-06-02 19:55:45 -05:00
keyan 8ac570d403 fixing subscribe and child reply duplicates 2023-06-02 16:48:39 -05:00
keyan c93ae90578 remove extra note checking condition 2023-06-01 14:54:44 -05:00
ekzyis ace2a4df3b
Match any port in dupe check (#297)
Co-authored-by: ekzyis <ek@stacker.news>
2023-05-31 19:49:28 -05:00
ekzyis 36d5478e74
Redirect to /login on /settings 401 (#295)
Co-authored-by: ekzyis <ek@stacker.news>
2023-05-31 19:47:03 -05:00
ekzyis 0c251ca376
Add thread subscriptions (#293)
* Add thread subscriptions

* remove dead code: reply only notifications

* break out thread subscription queries to reduce search space

* one db dip for item lists/threads re:meSubscription

---------

Co-authored-by: ekzyis <ek@stacker.news>
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
2023-05-31 19:44:06 -05:00
keyan 0de134309c improve perf of rank view perf 2023-05-24 02:35:39 -05:00
keyan 28263bc6c7 rank views 2023-05-23 09:21:04 -05:00
ekzyis a4e6ec0fba Add docs for local LND setup 2023-05-19 18:28:46 -05:00
keyan 31ce8cec93 truncate time to proper interval 2023-05-19 18:22:28 -05:00
keyan 4aee2c745f stats are averages now 2023-05-19 18:12:48 -05:00
keyan f6ab939bcc use mat views (tm) for historicals (tm) 2023-05-19 17:38:39 -05:00
keyan 0a3f5fd201 materialize dashboard in views 2023-05-19 17:38:39 -05:00
keyan 236dcae13b remove user analytics dos vector 2023-05-17 17:56:34 -05:00
keyan df1f1a483a require sub selection, allow editting 2023-05-10 19:30:51 -05:00
keyan 2579a6b51c fix ranking function order operation in wild west mode 2023-05-09 15:07:23 -05:00
keyan 80968d7b35 let comments influence ranking 2023-05-09 13:52:35 -05:00
keyan d948a653c9 add earned sats to items 2023-05-08 18:10:41 -05:00
keyan fbd746b023 fix auction ranking with query layers 2023-05-08 17:32:37 -05:00
keyan 67b815d9d6 preserve ordering in new layered item query 2023-05-08 15:06:42 -05:00
keyan 7b60dc5e9f use getItem meta helper more places 2023-05-07 15:21:58 -05:00
keyan 3c8ea0db22 reduce io blocking ssr 2023-05-07 10:44:57 -05:00
keyan 3465eb7aba handle application uris in invoices 2023-05-07 10:02:59 -05:00
keyan 61d57056ed I dip you dip one db dip 2023-05-06 20:27:51 -05:00
keyan 1c608d42f4 denormalize votes 2023-05-06 18:53:10 -05:00
keyan a97f8229b0 avoid extra dip when getting users 2023-05-06 18:18:18 -05:00
keyan 347a6a54d2 improve comment performance 2023-05-06 16:51:17 -05:00
keyan 3d4d86a40a simplify item queries with subs 2023-05-05 13:06:53 -05:00
keyan b406f0c340 avoid db dip for sub 2023-05-05 12:39:57 -05:00
keyan abd9555792 fix recent comments 2023-05-04 19:20:48 -05:00
keyan b59f277a3b fix job count on analytics 2023-05-04 13:44:00 -05:00
keyan cd9c0086ef fix top users missing return field 2023-05-02 17:02:08 -05:00
keyan 4be5286122 hide cowboy hat setting 2023-05-01 16:52:02 -05:00
keyan a241d683d8 nostr sub 2023-05-01 15:58:30 -05:00
keyan d08d593f69 undo april fools 2023-04-03 09:08:15 -05:00
keyan 9cbc895e29 april fools 2023-04-01 16:59:37 -05:00
keyan e4a3095cb4 give pinned item recent sort by default 2023-03-19 10:43:33 -05:00
keyan 9afbe0abd8 enhance item related query perf 2023-02-24 10:35:05 -06:00
ekzyis 7b838cdeb2
Implement bookmarking of posts and comments (#235) 2023-02-16 16:23:59 -06:00
keyan 30cde2ea38 fix nip57? 2023-02-15 11:20:43 -06:00
ekzyis c941c76292 Mention slashtags auth in README
This also makes SLASHTAGS_SECRET optional.
If none is set, random bytes will be generated. This is useful for local development.
2023-02-10 16:12:18 -06:00
keyan 97f74da0fd top cowboys 2023-02-09 12:41:28 -06:00
keyan a5b2de64d3 remove bolt on posts forwarding to self 2023-02-08 18:11:28 -06:00
keyan 4cae1ae230 reuse validation on server 2023-02-08 13:39:53 -06:00
keyan 36ddb25b46 remove extra queries 2023-02-03 18:08:08 -06:00
keyan 3a9994a9a6 denormalize user streak to avoid extra dip 2023-02-03 14:40:30 -06:00
keyan d24b0727ea fix streak length time zone 2023-02-01 18:09:28 -06:00
keyan 072e60c954 streaks 2023-02-01 17:40:49 -06:00
keyan 816361bd96 remove semicolons from last merge 2023-01-27 18:08:58 -06:00
ekzyis 4ab66a67ae
Add proxy with cache for coinbase API requests (#226) 2023-01-27 17:20:33 -06:00
keyan 291fe24363 denormalize bountyPaidTo 2023-01-26 17:28:10 -06:00
keyan 80f04b5a28 remove expensive query 2023-01-26 15:00:45 -06:00
keyan d8e3e73def check for rootId 2023-01-26 13:37:51 -06:00
keyan 5306b11157 improve bounty performance 2023-01-26 13:09:57 -06:00
Austin Kelsay e13e37744e
stackernews bounties (#227)
bounties
2023-01-26 10:11:55 -06:00
keyan ceac96e149 dup /live variation of youtube link 2023-01-24 08:37:33 -06:00
keyan 29c59d93ea open timestamps 2023-01-22 14:17:50 -06:00
keyan 9644a9f867 slashtags auth 2023-01-18 12:49:20 -06:00
keyan 71e61e51e8 fix youtube dupe regex 2023-01-13 17:42:40 -06:00
keyan 9c0ead308b remove debug logging 2023-01-13 13:19:42 -06:00
keyan 10ff3fa1c3 delete 2023-01-13 11:52:18 -06:00
keyan ed153b5199 add similar section to posts 2023-01-12 14:30:17 -06:00
keyan 9823969418 unshorten links 2023-01-12 12:05:47 -06:00
keyan afc9a70a02 ignore subdomains on dupe detection 2023-01-11 16:20:14 -06:00
keyan 2b878e1a19 more youtube dupe detection 2023-01-11 16:04:50 -06:00
keyan b7830261d8 ignore case on url dupe detection 2023-01-11 15:05:30 -06:00
keyan 15c76aa134 recognize all youtube links 2023-01-11 14:58:52 -06:00
Keyan 10e5257375
Merge branch 'master' into 190-strip-tracking-info 2023-01-11 12:17:25 -06:00
keyan 2d012ba7fe allow nip05 for users 2023-01-06 18:53:29 -06:00
keyan 2080cb896d lexical beta test url 2023-01-05 13:24:09 -06:00
keyan ee17518abf add referrer stats to top 2022-12-19 17:00:53 -06:00
keyan 41226245c5 referrals 2022-12-19 16:27:52 -06:00
keyan 4282f6724f fix rewards query 2022-12-09 15:37:13 -06:00
keyan 7b7ed0047c turbo tipping 2022-12-09 13:25:38 -06:00
keyan e1bdb9c769 donations to rewards 2022-12-07 18:04:02 -06:00
keyan 439c83f975 all things being equal, sort comments by sats 2022-12-06 15:23:45 -06:00
keyan f6a95c81eb add spender/stacker types 2022-12-06 13:26:33 -06:00
keyan c3892d8a25 use indices to query growth 2022-12-01 17:14:16 -06:00
keyan 2a4e5a0617 add more filters to recent 2022-12-01 16:42:49 -06:00
keyan a2db3e18b4 better user analytics mostly 2022-12-01 15:31:04 -06:00
keyan 7df375e752 improvements to jobs 2022-11-29 11:29:43 -06:00
keyan de863021f9 prevent apollo caching on the server 2022-11-24 13:22:58 -06:00
keyan 5746160893 let tips affect ranking 2022-11-23 12:12:09 -06:00
keyan 1bf747c7c0 sats to msats 2022-11-16 10:57:03 -06:00
keyan 8de00c741d poll for notifications less, don't retry gql 2022-11-16 10:57:03 -06:00
ekzyis 3a36a211af Remove tracking from twitter URLs 2022-11-16 00:58:02 +01:00
keyan 525cab2573 upgrade deps 2022-11-06 11:28:58 -06:00
keyan 368f74a7c5 3 hour cliff for all items 2022-10-31 12:56:48 -05:00
keyan 60d84e2ddd make related matching less strict 2022-10-29 10:13:57 -05:00
keyan 6d2b88fa7b use votes in es queries 2022-10-28 12:25:26 -05:00
keyan ba5c40d165 use votes in es queries 2022-10-28 11:21:36 -05:00
keyan cb7f68e0e5 index wvotes for search 2022-10-28 10:58:31 -05:00
keyan 760b6b6e10 related items 2022-10-27 15:25:42 -05:00
keyan 6c9f4f1c3a for top users constrain other stats 2022-10-26 09:56:22 -05:00
keyan ec133e8ea2 handle empty search query 2022-10-25 17:30:54 -05:00
keyan a398784f26 improved top 2022-10-25 16:35:32 -05:00
keyan 30b1ee33aa user search 2022-10-25 12:13:06 -05:00
keyan 032c04959a add url and nym search 2022-10-24 16:32:16 -05:00
keyan 79af550168 add guide to footer 2022-10-23 10:43:39 -05:00
keyan e4d150413b search filters 2022-10-20 17:44:44 -05:00
keyan 1bcfb787a6 add changelog to footer 2022-10-10 16:58:50 -05:00
keyan aed7e0f667 fix auction position query 2022-10-05 13:55:30 -05:00
ekzyis 2dd4b1ce98
Merge branch 'master' into 103-add-other-currencies 2022-10-04 01:01:43 +02:00
keyan 46ea2f661c make jobs great again 2022-09-29 15:42:33 -05:00
keyan 52fab60cda fix missing search fields 2022-09-28 11:28:53 -05:00
keyan d9d426e5c3 add freebies 2022-09-27 16:19:15 -05:00
keyan 9c4d74888f add borderland 2022-09-22 15:42:04 -05:00
keyan 2c7c237fc7 show when items are outlawed 2022-09-22 13:44:50 -05:00
keyan 7faae425b3 wild west mode 2022-09-21 14:57:36 -05:00
ekzyis 22e07a4318 Fix errors if me null 2022-09-18 03:07:14 +02:00
keyan 08893d020c improved earning: more detail, longer top tail 2022-09-14 17:01:30 -05:00
ekzyis 7d49b686aa Fix fiatCurrency gql type 2022-09-13 02:24:31 +02:00
ekzyis f66a8162da Fix rebase 2022-09-13 02:08:24 +02:00
ekzyis 5d4abecf3c Add input for fiat currency in settings 2022-09-13 02:02:55 +02:00
keyan 48990d5987 when linking email store as lowercase 2022-09-12 14:10:15 -05:00
keyan 69b5aed85d fix 'me' on refresh 2022-09-06 10:08:53 -05:00
keyan 7efc86427d maintage pagination and other state on back button 2022-09-06 08:32:00 -05:00
keyan 89a57749d4 fix ambiguous sats reference 2022-09-02 14:05:44 -05:00
keyan f65f6c1b28 remove meComments and clean up sats title 2022-09-01 16:20:20 -05:00
keyan 4be5cfa5c7 display earned sats in comments 2022-09-01 16:06:11 -05:00
keyan a5d1d8dc0f user suggestions on forward 2022-08-31 14:09:49 -05:00
keyan 172d6c3c2f optionally hide invoice descriptions 2022-08-30 16:50:47 -05:00
keyan 0ad886ffc0 constrain invoice quantity and amount 2022-08-30 15:33:39 -05:00
keyan 065cf284b3 add integer constraints 2022-08-27 10:48:59 -05:00
keyan ec2ac6e698 fix comment editing validation 2022-08-26 21:57:41 -05:00
keyan 863e717c05 fix broken comments 2022-08-26 20:27:57 -05:00
keyan 5b2cfd11cc server side validate title length 2022-08-26 18:31:51 -05:00
keyan 04d9c45156 server side validate nym 2022-08-26 17:26:42 -05:00
keyan ccb5a81dd5 add recent comments 2022-08-18 17:05:58 -05:00
keyan 388c7d0240 full powered editing 2022-08-18 13:15:24 -05:00
keyan 69d0082839 fix null boolean 2022-08-11 16:42:52 -05:00
keyan ddb4a30c4b spam fees 2022-08-11 15:38:10 -05:00
keyan 82280b0966 add polls 2022-07-30 08:51:04 -05:00
keyan 5ac894baed more expensive boost + explainer 2022-07-24 11:55:22 -05:00
keyan cb313429d5 job board enhancements 2022-07-21 17:55:05 -05:00
keyan 93a19839cf add earning to top stacking users 2022-07-13 19:55:10 -05:00
keyan 9581160944 better reward notifications 2022-07-05 15:18:59 -05:00
keyan 9d3c52ed00 improve trust 2022-07-05 14:51:13 -05:00
keyan d86bf302ee make upvoted items sticker posts/comments 2022-07-01 13:38:47 -05:00
keyan 4c7a6e4998 fixes/enhancements to users dashboard 2022-07-01 13:26:34 -05:00
keyan 6dd3bd9ed3 make highly upvoted items stickier 2022-07-01 13:26:05 -05:00
keyan 86af5a46ec fix weekly stat typos 2022-06-24 13:59:02 -05:00
keyan 0b3b690c10 user stats 2022-06-24 10:38:00 -05:00
keyan 2c749dd07f monthly earning users 2022-06-22 16:13:51 -05:00
keyan f024cd39a2 add usage mvp usage charts 2022-06-10 14:20:33 -05:00
keyan 1df49e03d9 account linking 2022-06-08 16:26:44 -05:00
keyan 8713bf178a show dead jobs 2022-06-02 18:25:21 -05:00
keyan c061f4a6f0 limit pending invoices 2022-05-31 17:17:48 -05:00
keyan ba4644463f allow lightning address send callback to have query params 2022-05-24 16:15:51 -05:00
keyan 6a8fba14eb check invoice description hash against lnurl pay metadata 2022-05-19 09:22:25 -05:00
keyan 6cc7288e99 ignore hashtag in url dupe detection 2022-05-18 13:21:24 -05:00
keyan 4d8ff46574 better error message with 0 invoice 2022-05-18 13:13:13 -05:00
keyan f7d3f281b8 set cache control on uploads 2022-05-18 11:59:59 -05:00
keyan dea34e0b93 only check tips and votes for notifications 2022-05-18 11:43:37 -05:00
keyan 35b533c572 denormalize ranking metrics 2022-05-17 14:54:12 -05:00
keyan efa267f128 use act index in item queries 2022-05-16 17:18:11 -05:00
keyan 29fb37b763 profile photos 2022-05-16 15:51:22 -05:00
keyan 9abc41b7b2 image uploading backend 2022-05-12 13:44:21 -05:00
keyan e2409efbaf indicate to user when there are new jobs 2022-05-09 13:01:23 -05:00
keyan 222335ca5e increase boost gravity 2022-05-08 09:09:53 -05:00
keyan aa4ac2ecc9 add ln addr + lnurl pay qr code to profile pages 2022-05-06 14:34:35 -05:00
keyan 9f48daecc3 decay ranking slower 2022-05-05 12:43:58 -05:00
keyan 771978d562 sub to newsletter on sign up 2022-05-04 13:29:30 -05:00
keyan 798b055fb9 remove unecessary queries on resp critical path 2022-05-01 20:01:33 -05:00
keyan dc44764008 limit related queries in me query for SSR 2022-04-28 17:00:09 -05:00
keyan 934c5021a9 a few perf enhancements + gql slowlogs 2022-04-28 13:11:05 -05:00
keyan 8e0aaab161 refine module instantiation 2022-04-27 17:06:42 -05:00
keyan b68fadc63d allow daily discussion to appear in recent 2022-04-25 12:03:21 -05:00
keyan cef122141f only one earn notification at a time 2022-04-24 11:16:51 -05:00
keyan 188230c37c add notification settings 2022-04-21 17:50:02 -05:00
keyan 74b191837e refine reply-only notifications 2022-04-21 12:48:27 -05:00
keyan e1ffef8308 allow just showing replies in notifications 2022-04-20 16:35:30 -05:00
keyan d978ff5ea5 forward tips from posts 2022-04-19 13:32:39 -05:00
keyan 822fa9113a refactor link/dicussion to upserts and reuse more code 2022-04-18 17:10:26 -05:00
keyan 2b594109ea WIP forward 2022-04-18 15:19:07 -05:00