feat: push notification when a shared shopping list is updated
Shared shopping lists (owner + collaborator-invite members) had no real-time coordination signal — no way to know someone else just checked off milk or added items while you're mid-aisle. Notifies every other member (excluding the actor) via push when an item is checked off or items are added; no-op for solo unshared lists. Deliberately skips the notifications table/notification-center (same pattern as the existing leftover-expiry cron) — this is a lightweight best-effort ping, not a persistent event, so it avoids a notification_type enum migration and a new FK column for something transient. Verified locally: added a real member to a shared list, registered a push subscription, confirmed the check-off request's added latency (945ms vs ~20ms baseline) shows the actual webpush call fired against the recipient — individual subscription failures are swallowed by design (Promise.allSettled in the existing sendPushNotification, unchanged); confirmed a solo list stays fast (no recipients to notify, true no-op).
This commit is contained in:
@@ -41,7 +41,9 @@
|
||||
"detail": {
|
||||
"comment": "{name} a commenté votre recette « {title} »",
|
||||
"rating": "{name} a noté votre recette « {title} » {stars} étoiles",
|
||||
"leftoverExpiring": "Votre « {dish} » de « {title} » arrive à expiration — à manger vite !"
|
||||
"leftoverExpiring": "Votre « {dish} » de « {title} » arrive à expiration — à manger vite !",
|
||||
"shoppingListChecked": "{name} a coché « {item} » dans « {list} »",
|
||||
"shoppingListItemsAdded": "{name} a ajouté {countLabel} à « {list} »"
|
||||
},
|
||||
"pushTitle": {
|
||||
"follow": "Nouvel abonné",
|
||||
@@ -50,7 +52,8 @@
|
||||
"reaction": "Nouvelle réaction",
|
||||
"rating": "Nouvelle note",
|
||||
"mention": "Vous avez été mentionné",
|
||||
"leftoverExpiring": "Restes bientôt périmés"
|
||||
"leftoverExpiring": "Restes bientôt périmés",
|
||||
"shoppingListUpdate": "Mise à jour de la liste de courses"
|
||||
}
|
||||
},
|
||||
"recipe": {
|
||||
|
||||
Reference in New Issue
Block a user