Commit graph

13 commits

Author SHA1 Message Date
mplorentz
b90a20424e Fix Mail.sync to only fire when the user saves, or when contents are loaded from disk
All checks were successful
CI / lint-check-build (pull_request) Successful in 4m9s
2026-09-21 11:54:19 -04:00
Agent
3981ed9608 fix email notifications: match mailship PUT API with full-URL NIP-98 and payload tag
All checks were successful
CI / lint-check-build (pull_request) Successful in 3m19s
- register(): sign makeHttpAuth with full URL (/subscription/email),
  method PUT, and serialized body so both u-tag and payload tag match
  mailship's verifyNip98Auth. Drop pubkey from request body (server
  reads it from the auth event).
- unregister(): sign makeHttpAuth with full URL (/subscription/:key)
  and method DELETE, matching mailship's u-tag expectation.

Closes PR #4
2026-09-16 13:50:47 -04:00
mplorentz
d6f0e47edf debounce subscription syncing
All checks were successful
CI / lint-check-build (pull_request) Successful in 4m4s
2026-09-03 13:43:10 -04:00
mplorentz
cbba1035e7 Fix bug where email 30390s would be deleted if push notifications were toggled off.
Some checks failed
CI / lint-check-build (pull_request) Has been cancelled
2026-09-03 13:04:29 -04:00
mplorentz
42561c8c02 Use salt instead of device id for email settings 2026-09-03 12:47:36 -04:00
mplorentz
8047a4f084 Always PUT email subscription (remove GET-first lookup)
Some checks failed
CI / lint-check-build (pull_request) Has been cancelled
Mailship's /subscription/email is now an idempotent PUT upsert. Drop the
lookup-before-register dance and always PUT the settings; mailship skips the
confirmation email when nothing changed or only the frequency changed.
2026-09-03 11:52:31 -04:00
mplorentz
3e892d76f6 Sync email settings only when changed
Some checks failed
CI / lint-check-build (pull_request) Has been cancelled
2026-09-01 15:59:30 -04:00
mplorentz
83a8bb1572 Send include_event tag with 30390
Some checks failed
CI / lint-check-build (pull_request) Has been cancelled
2026-08-27 15:44:37 -04:00
mplorentz
dd1182cb32 Save email notification prefs to app settings
Some checks failed
CI / lint-check-build (pull_request) Has been cancelled
2026-08-27 15:08:37 -04:00
mplorentz
c0f545350c Merge branch 'dev' into email-notifications
Some checks failed
CI / lint-check-build (pull_request) Has been cancelled
2026-08-24 14:40:44 -04:00
Agent
5cbc1e459c Show email registration errors in UI
- Add error field to EmailNotificationState type
- Set user-friendly error messages in MailNotifications.register() for:
  missing signer, missing server config, NIP-98 auth failure,
  network errors, and server errors
- Clear error on successful registration
- Show inline error banner in the email settings card
- Return early on registration failure (like push does)
- Clear error when user edits email/frequency or clicks reset
2026-08-20 12:22:53 -04:00
mplorentz
725ef45d9d Fix signer error 2026-08-20 11:51:26 -04:00
Agent
fee6f565ff Email notifications: settings UI + mail adapter
- Add VITE_EMAIL_NOTIFICATION_SERVER env var
- Extend notificationSettings with email, emailFrequency, emailAddress
- Add emailNotificationState store in push/adapters/common.ts
- New src/app/mail/index.ts with MailNotifications class:
  register/unregister with mailship via NIP-98 auth,
  publish kind 30390 NIP-9a subscription events
- Wired into alerts settings save handler
- Email Digest Settings card in alerts UI
2026-08-20 11:15:35 -04:00