hotfix/cp-12815-preserve-attributes-tags-and-subscription-history-when-user-re-enables-notifications

UN
12d ago
+27-1

Preserve subscription data when notifications are disabled and re-enabled


[!NOTE]
Medium Risk
Changes unsubscribe cleanup and subscription sync payload affect targeting and server-side subscription state when notifications are toggled.

Overview
When users unsubscribe with keepTargetingDataOnUnsubscribe enabled, Piano segments are now kept in local prefs alongside topics, tags, and attributes—they are only cleared when that flag is off.

Subscription sync (/subscription/sync/) now reads stored tags and custom attributes from SharedPreferences and includes them in the sync payload (tags, customAttributes), so re-enabling notifications can restore targeting data on the server without losing local history.

Reviewed by Cursor Bugbot for commit dbbf36fa490725feae1cd9fe431233c827952e29. Bugbot is set up for automated code reviews on this repo. Configure here.


Summary by cubic

Preserves subscription data when users disable and re-enable notifications.

  • Piano segments are no longer cleared when keepTargetingDataOnUnsubscribe is enabled.
  • Restores saved tags and custom attributes during subscription sync after re-enabling notifications.