-
-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More push notification types #530
More push notification types #530
Conversation
4ae3a78
to
e39b366
Compare
e39b366
to
7fd0a3f
Compare
This is done except for job updates. For push notifications on Job updates, we need to check forupdates here. Unfortunately, I will most likely not be able to finish this until next week since I'll be in Berlin tomorrow. So I would say let's review this as is and merge since I think job update push notifications are not relevant for 99% of stackers. Also, I wasn't able to test invites and referrals. For referrals, I think there is still this bug where it doesn't work for lightning or nostr. And with invites, I get redirected to |
Ahh, I missed the release nvm then haha |
You missed it just by a hair. I checked back at least 5 times because I kept seeing notifications. We can still deploy it soon if it only needs your stamp of approval. |
Good to go from me, I can't approve my own PR in Github |
Looks really well done! Great job! |
sendUserNotification(earner.userId, { | ||
title: `you stacked ${numWithUnits(msatsToSats(earnings), { abbreviate: false })} in rewards`, | ||
tag: 'EARN' | ||
}).catch(console.error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, there is one notification per user and type and not one notification per user only. So only the last notification shows up since the others before get replaced.
I have to sum the rewards up in the serviceworker (or sum them up here and only send one push notification) and I can include the rewards per type in the body then.
Closes #372
job updatesvideos
deposits:
2023-09-29.00-33-35.mp4
earning & losing cowboy hats:
2023-10-04.20-58-38.mp4
daily rewards:
2023-10-04.21-07-47.mp4