fix(notifications): route partner_left/partner_deleted_account to Home (E-002 P3)
Added PARTNER_UNPAIRED type for the two real 'you are unpaired' pushes -> Home, where the now-solo user gets the Invite CTA (matches body 'Tap to create a new invite'). Documented that invite_created (server audit log, read:true) and spki (a crypto key-format string in the RevenueCat webhook, not a notification) are false positives needing no routing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
f63188d97a
commit
46010508a9
|
|
@ -250,6 +250,15 @@ enum class PartnerNotificationType(
|
|||
body = "Tonight's question is a good reason to reconnect.",
|
||||
channelId = NotificationChannelSetup.CHANNEL_REMINDERS,
|
||||
rateType = NotificationRateLimiter.Type.REMINDER
|
||||
),
|
||||
// Partner left the couple or deleted their account — the user is now unpaired.
|
||||
// Routed to Home, which surfaces the "Invite partner" CTA for the now-solo user
|
||||
// (matches the push body "Tap to create a new invite"). E-002.
|
||||
PARTNER_UNPAIRED(
|
||||
title = "You're no longer paired.",
|
||||
body = "Tap to create a new invite.",
|
||||
channelId = NotificationChannelSetup.CHANNEL_PARTNER_ACTIONS,
|
||||
rateType = NotificationRateLimiter.Type.PARTNER_TRIGGER
|
||||
);
|
||||
|
||||
/**
|
||||
|
|
@ -275,6 +284,7 @@ enum class PartnerNotificationType(
|
|||
PARTNER_JOINED -> if (coupleId.isNotBlank()) AppRoute.pairingSuccess(coupleId) else AppRoute.HOME
|
||||
DATE_MATCH -> AppRoute.DATE_MATCHES
|
||||
REENGAGEMENT -> AppRoute.DAILY_QUESTION
|
||||
PARTNER_UNPAIRED -> AppRoute.HOME
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
|
@ -298,6 +308,10 @@ enum class PartnerNotificationType(
|
|||
"partner_joined" -> PARTNER_JOINED
|
||||
"date_match" -> DATE_MATCH
|
||||
"reengagement" -> REENGAGEMENT
|
||||
"partner_left", "partner_deleted_account" -> PARTNER_UNPAIRED
|
||||
// NB: "invite_created" is a server-side audit-log entry (read:true, never sent
|
||||
// as a push) and "spki" is a crypto key-format string in the RevenueCat webhook
|
||||
// (not a notification type at all) — neither needs client routing. E-002.
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue