Skip to content

Read dd-originated flag and update test#45

Open
chante-gobel wants to merge 1 commit into
masterfrom
feature/dd-originated-flag
Open

Read dd-originated flag and update test#45
chante-gobel wants to merge 1 commit into
masterfrom
feature/dd-originated-flag

Conversation

@chante-gobel

@chante-gobel chante-gobel commented Jun 3, 2026

Copy link
Copy Markdown

What's being changed

  • Version bump: 1.3.0 → 1.4.0
  • Added ddOriginated to the return value of handlePush in foundation.ts- it now resolves [{ url, ddOriginated }] where ddOriginated reflects the dd-originated flag from the push payload
  • Fixed the @method JSDoc tag on handlePush - it was incorrectly labelled
  • Fixed tests in foundation.spec.ts to correctly test the new return shape and call the right method name handlePush not handleLink

Why it's being changed

Dotdigital push notifications include a dd_originated flag in the payload to indicate the message was sent by the Dotdigital platform. Consumers of the SDK need access to this flag to differentiate Dotdigital-originated pushes from other push messages.

How to review / test this change

  • Run npm run test - all Foundation tests should pass
  • Should read dd-originated flag from payload
  • Should read dd-originated flag from payload without deep link
  • Should default dd-originated to false when not present

Link to work item

https://dev.azure.com/dotdigital/ec/_workitems/edit/345331

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.

1 participant