Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Allow any userIdentificationType to be used when initializing kit #48

Merged
merged 6 commits into from
May 3, 2024

Conversation

rmi22186
Copy link
Collaborator

@rmi22186 rmi22186 commented May 1, 2024

Instructions

  1. PR target branch should be against development - Since this is Braze and there is a v3 and a v4, this does not apply as we need to manually release
  2. PR title name should follow this format: https://github.com/mParticle/mparticle-workflows/blob/main/.github/workflows/pr-title-check.yml
  3. PR branch prefix should follow this format: https://github.com/mParticle/mparticle-workflows/blob/main/.github/workflows/pr-branch-check-name.yml

Summary

Previously we allowed a user to be identified on initialization only if they chose MPID as their userIdentificationType. This prevents customers from being able to use kit forwarding rules in Braze if they have any other userIdentificationType picked. Removing this constraint fixes that.

Testing Plan

  • Was this tested locally? If not, explain why.
    Added a test setting email to be the userIdentificationType

Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)

@rmi22186 rmi22186 requested a review from alexs-mparticle May 1, 2024 15:45
@rmi22186 rmi22186 force-pushed the fix/SQDSDKS-6345-identify-with-any-user-type branch from 2f551bf to dd4c425 Compare May 2, 2024 20:57
@@ -792,10 +794,13 @@ var constructor = function () {
braze.addSdkMetadata(['mp']);
primeBrazeWebPush();

if (forwarderSettings.userIdentificationType === 'MPID' && mParticle.Identity != null && mParticle.Identity.getCurrentUser().getMPID() != null) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

If we're no longer referencing forwarderSettings, we should remove it from the function parameters.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is still being passed to openSession at the bottom of this function

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ooof. Missed that.

src/BrazeKit-dev.js Outdated Show resolved Hide resolved
@@ -792,10 +794,13 @@ var constructor = function () {
braze.addSdkMetadata(['mp']);
primeBrazeWebPush();

if (forwarderSettings.userIdentificationType === 'MPID' && mParticle.Identity != null && mParticle.Identity.getCurrentUser().getMPID() != null) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ooof. Missed that.

@rmi22186 rmi22186 merged commit 5cc5362 into master-v4 May 3, 2024
2 checks passed
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.

2 participants