Skip to content

Conversation

@ycheng-kickstarter
Copy link
Contributor

@ycheng-kickstarter ycheng-kickstarter commented Oct 1, 2025

📲 What

In MessageService.kt, add logic to parse messages related to Pledge Redemption.

🤔 Why

We forgot to actually add logic to parse pledge redemption messages in MessageService when we first worked on PM push notifs in #2172 ...so users haven't been able to receive PM push notifs

🛠 How

Spent some time with @a-lavis and we determined the backend sends us a payload like this, so we'd need to parse the order json block:

{
  "GCM": {
    "data": {
      "gcm": {
        "title": "Finalize your pledge",
        "alert": "Response needed! Get your reward for backing India Street Lettering: A Book."
      },
      "type": "complete_pledge_redemption",
      "ref_tag": "android_complete_pledge_redemption_push",
      "order": {
        "id": 327151,
        "backing_id": 186055186,
        "project_id": 1464449823,
        "pledge_manager_path": "/projects/blaft/india-street-lettering-a-book/backing/redeem"
      }
    }
  },
  "default": "Response needed! Get your reward for backing India Street Lettering: A Book."
}

👀 See

📋 QA

Story 📖

https://kickstarter.atlassian.net/browse/MBL-2833

return channels
}

@TargetApi(Build.VERSION_CODES.O)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Snuck this change in that I missed when I bumped our sdk to Build.VERSION_CODES.O_MR1

@codecov-commenter
Copy link

codecov-commenter commented Oct 1, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.64%. Comparing base (172be4b) to head (634fa76).
⚠️ Report is 1 commits behind head on master.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #2428   +/-   ##
=========================================
  Coverage     64.64%   64.64%           
  Complexity     2391     2391           
=========================================
  Files           376      376           
  Lines         28453    28453           
  Branches       4121     4121           
=========================================
  Hits          18394    18394           
  Misses         7800     7800           
  Partials       2259     2259           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ycheng-kickstarter ycheng-kickstarter marked this pull request as ready for review October 1, 2025 16:02
.survey(gson.fromJson(data["survey"], Survey::class.java))
.pledgeRedemption(
gson.fromJson(
data["order"], PushNotificationEnvelope.PledgeRedemption::class.java
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ycheng-kickstarter any chance we can add as reference the ruby controller counterpart? I really wanna double check the data structure we should receive, I've been out of the loop for PM pushes for quite a long time so catching up :).

Copy link
Contributor Author

Copy link
Contributor

@Arkariang Arkariang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed with @ycheng-kickstarter there will be QA session alongside @a-lavis (team-b) in Prod.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants