Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Push delivery: make the worker's VAPID authorizer required

Chiusa Adatta ai principianti
#423 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Una pull request collegata è già stata integrata.

  • #543 di @PelikanFix16 — integrata

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
82/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
backend

Direzione di ricerca

Inizia da app/apps/worker/src/push/deliver.ts intorno alla riga 86, dove si trovano il campo opzionale vapid e il suo commento, poi controlla la riga 98, dove viene passato a webPushSender. Rendi il campo obbligatorio e aggiorna il commento. Successivamente, aggiorna i chiamanti dei test elencati nell'issue (app/tests/app/push.test.ts e altri tre) in modo che passino createVapidAuthorizer() da apps/worker/src/push/index.ts. È completato quando il controllo dei tipi, il lint e ./scripts/check_application.sh passano.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

good first issue

DeliveryDependencies.vapid is optional in the worker's push delivery. Every production caller passes the worker's one authorizer, which reuses a VAPID JWT per push service; when the field is left out, each delivery silently signs its own JWT instead. Making it required lets the type checker catch a future caller that forgets it.

Where to look

  • app/apps/worker/src/push/deliver.ts (around line 86): vapid?: VapidAuthorizer and its comment; line 98 passes it to webPushSender.
  • app/apps/worker/src/index.ts (line 26) and app/apps/worker/src/push/index.ts (line 22): the production path, which already passes it.
  • Tests that call deliverPush({ db, config }) without it: app/tests/app/push.test.ts, notifications.test.ts, notification-summary-native.test.ts, notification-inbox.test.ts (git grep -n "deliverPush({" app/tests).

Acceptance criteria

  • vapid is required in DeliveryDependencies, and its comment no longer describes the "without one" case.
  • Every caller passes an authorizer; tests use createVapidAuthorizer() (exported from apps/worker/src/push/index.ts), ideally one per test file.
  • Type check, lint and the full Docker suite pass.

How to check
./scripts/check_application.sh (builds, type checks, lints and runs the API tests, including the push tests against the push-service mock).

New to Flux? Start with CONTRIBUTING. Comment here to say you are taking it.

Carried over from the #185 handoff, as suggested on #306.

Lingua principale
TypeScript
Stelle
3
Fork
0
Merge medio
22h 20m
PR unite (30g)
343

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ColdPhase/flux

Tutte le issue di ColdPhase/flux

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.