Commit Graph

39 Commits

Author SHA1 Message Date
SatsAllDay 77c87dae80
honor mutes when sending push notifications (#1145)
* 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>
2024-05-12 13:55:56 -05:00
keyan bc2155c7aa update awards.csv 2024-05-06 11:01:31 -05:00
keyan 1b5e513f5e update awards.csv 2024-05-06 09:07:13 -05:00
keyan 1e3042e536 update awards.csv 2024-05-04 19:17:04 -05:00
keyan 2e65bf9126 update awards.csv 2024-05-04 18:53:09 -05:00
SatsAllDay 15f9950477
Store hashed and salted email addresses (#1111)
* first pass of hashing user emails

* use salt

* add a salt to .env.development (prod salt needs to be kept a secret)
* move `hashEmail` util to a new util module

* trigger a one-time job to migrate existing emails via the worker

so we can use the salt from an env var

* move newsletter signup

move newsletter signup to prisma adapter create user with email code path
so we can still auto-enroll email accounts without having to persist the email address
in plaintext

* remove `email` from api key session lookup query

* drop user email index before dropping column

* restore email column, just null values instead

* fix function name

* fix salt and hash raw sql statement

* update auth methods email type in typedefs from str to bool

* remove todo comment

* lowercase email before hashing during migration

* check for emailHash and email to accommodate migration window

update our lookups to check for a matching emailHash, and then a matching
email, in that order, to accommodate the case that a user tries to login
via email while the migration is running, and their account has not yet been migrated

also update sndev to have a command `./sndev email` to launch the mailhog inbox in your browser

also update `./sndev login` to hash the generated email address and insert it into the db record

* update sndev help

* update awards.csv

* update the hack in next-auth to re-use the email supplied on input to `getUserByEmail`

* consolidate console.error logs

* create generic open command

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
2024-05-04 18:06:15 -05:00
Keyan e9a33ae12e
Update awards.csv 2024-04-29 20:05:55 -05:00
Keyan ccc9cefb68
Update awards.csv 2024-04-28 17:21:07 -05:00
keyan 4a6e3ed735 update awards.csv 2024-04-28 17:11:09 -05:00
keyan 71f3dba891 benalleng awards catchup 2024-04-28 16:27:55 -05:00
Keyan d41b2e14f1
Update awards.csv 2024-04-22 10:08:33 -05:00
Keyan 15c6843d80
Update awards.csv 2024-04-21 17:44:45 -05:00
Keyan 7d587c7cf8
Update awards.csv 2024-04-16 19:27:58 -05:00
Keyan c19c9124ec
Update awards.csv 2024-04-16 13:43:02 -05:00
Keyan 40131da8bd
Update awards.csv 2024-04-14 18:22:08 -05:00
Keyan b1c45a4ab3
Update awards.csv 2024-04-13 13:17:22 -05:00
Keyan 75232ba5fa
Update awards.csv 2024-04-12 18:39:47 -05:00
Keyan b477f23aac
Update awards.csv 2024-04-12 18:14:54 -05:00
Keyan c8480a4996
Update awards.csv 2024-04-09 18:42:20 -05:00
Keyan 1d4ba7b9a6
Update awards.csv 2024-04-05 08:47:58 -05:00
Keyan 76f90e0691
Update awards.csv 2024-04-04 19:53:19 -05:00
Keyan 2ee730f8b5
Update awards.csv 2024-04-04 16:36:01 -05:00
Keyan c2d207fbbb
Update awards.csv 2024-04-04 16:07:21 -05:00
Keyan 168fd95bf0
Update awards.csv 2024-04-04 16:07:01 -05:00
Keyan fa237d98c9
Update awards.csv 2024-04-04 16:04:58 -05:00
Keyan 690d2849e9
Update awards.csv 2024-03-28 10:47:12 -05:00
Keyan b4cef44a43
Update awards.csv 2024-03-26 14:32:43 -05:00
Keyan 1b507a52db
fix extra awards.csv column 2024-03-26 14:22:59 -05:00
Keyan e6f165df14
Update awards.csv 2024-03-26 14:22:12 -05:00
Keyan cce5168b6f
Update awards.csv 2024-03-25 17:29:27 -05:00
Keyan 0cb2b7d4f6
Update awards.csv 2024-03-25 17:20:26 -05:00
Keyan 8aee4f41df
Update awards.csv for #960 2024-03-24 13:52:46 -05:00
keyan e565e74e2d award for #956 2024-03-23 20:43:39 -05:00
keyan 101926a8bc award for #926 2024-03-23 17:00:30 -05:00
keyan 1e0cd468cc award for #942 2024-03-20 11:26:38 -05:00
keyan a3defdea94 add missed row to awards.csv 2024-03-18 12:46:23 -05:00
keyan d73ccb0dc0 update contribution awards for #933 2024-03-18 12:45:28 -05:00
Keyan 51358f5b79
Update awards.csv 2024-03-16 16:52:45 -05:00
keyan ec2dcdfd92 add awards.csv for tracking contributor awards 2024-03-16 16:52:00 -05:00