Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't this fail if
traits
are being attached to anonymous profile? Or do you plan to expose separate method for anonymous case?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean if traits is
nil
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. I mean, when profile is anonymous i.e.
userId
isnil
. But customer wants to attachtraits
to anonymous profile. Similar to this method in iOS.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, you’re right. This doesn’t meet the anonymous profile criteria. Iwilll go ahead and update it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rehan, I just realized that user identification is covered under a separate ticket, which will also address anonymous profiles.
I think it’s best to leave this change for that ticket to avoid scope creep. I understand that this condition doesn’t resolve the anonymous criteria, but I suggest handling it in the upcoming ticket.
Though this current change is also a scope creep but I wanted to do it to help testing the package better and as quick as we can.
I am dropping a note in the ticket so that this fix is not overlooked. Does that make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, since the ticket will make any necessary changes required to handle the case for anonymous profile, I'm good with it 👍🏻