diff --git a/app/src/main/java/app/closer/notifications/PartnerNotificationManager.kt b/app/src/main/java/app/closer/notifications/PartnerNotificationManager.kt index 2105102b..e86640ac 100644 --- a/app/src/main/java/app/closer/notifications/PartnerNotificationManager.kt +++ b/app/src/main/java/app/closer/notifications/PartnerNotificationManager.kt @@ -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 } }