-
Notifications
You must be signed in to change notification settings - Fork 2
SubscriptionRepository
Viames Marino edited this page Feb 22, 2026
·
1 revision
Pair\Push\SubscriptionRepository manages push_subscriptions persistence.
Insert or update by endpoint.
Expected payload fields:
endpoint-
keys.p256dh(or top-levelp256dh) -
keys.auth(or top-levelauth)
If required fields are missing, it throws InvalidArgumentException.
Returns active subscriptions for user (revoked_at IS NULL).
Soft-revokes endpoint (revoked_at timestamp).
Hard delete by endpoint.
-
upsert()also refreshesupdated_atandlast_seen_at. -
user_agentis truncated to 255 chars. - endpoint must be unique in table design for correct upsert behavior.
See also: PushDispatcher, WebPushSender, PairPush.js.