Skip to content

refactor: DRY identity events#87

Merged
rmi22186 merged 2 commits intodevelopmentfrom
refactor/reudce-duplication-of-identity-events
Apr 16, 2026
Merged

refactor: DRY identity events#87
rmi22186 merged 2 commits intodevelopmentfrom
refactor/reudce-duplication-of-identity-events

Conversation

@jamesnrokt
Copy link
Copy Markdown
Contributor

Summary

  • Create shared function handleIdentityComplete for all identity events

Testing Plan

  • Existing tests passing locally

Comment thread src/Rokt-Kit.ts Outdated

public onUserIdentified(user: IMParticleUser): string {
this.filters.filteredUser = user as FilteredUser;
return this.handleIdentityComplete(user, 'identify', 'onUserIdentified');
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nit: we should make these constants.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated with @khushi1033 changes

Copy link
Copy Markdown
Collaborator

@rmi22186 rmi22186 left a comment

Choose a reason for hiding this comment

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

nit: only feedback I have is the name of the commit - thought it says refactor, reduce duplication of identity events makes it sound like there was actual event duplication vs this DRY-ing things up.

refactor: DRY identity calls?

@jamesnrokt jamesnrokt changed the title refactor: Reduce duplication of identity events refactor: DRY identity events Apr 16, 2026
Resolves conflict between DRY refactor (handleIdentityComplete) and
the identity event schema fix (#88) by using RoktIdentityEventType
enum constants in the shared helper.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jamesnrokt
Copy link
Copy Markdown
Contributor Author

nit: only feedback I have is the name of the commit - thought it says refactor, reduce duplication of identity events makes it sound like there was actual event duplication vs this DRY-ing things up.

refactor: DRY identity calls?

@rmi22186 renamed the PR and resolved conflicts

@rmi22186 rmi22186 merged commit 2d70094 into development Apr 16, 2026
5 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.

3 participants