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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update email handlers #268

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update email handlers #268

wants to merge 1 commit into from

Conversation

griffithcaleb
Copy link

@griffithcaleb griffithcaleb commented Nov 12, 2021

馃敼 JIRA Ticket(s) if any

鉁忥笍 Description

The updateEmail method in the RN SDK does pass down the onFailureHandler or onSuccessHandler that are available in
the Native SDKs -> expose these methods to the RN side.
Scenario and Use Case
When launching the app the an 'anonymous' user is created using the setUserId method. In the current implementation if a user logs in we will want to updateEmail or setEmail based on if the user's is currently registered with Iterable. Because there is no way to know this before, we will have to assume that we will want to update the user's email and associate a 'non-placeholder email address with that user'. However if we try and updateEmail on a user's email address that already exists in Iterable the updateEmail call will fail silently because the onFailureHandler has not been passed down.

Resolve a promise back across the RN bridge with the message from the failed API call. So that we can then
setEmail({theEmailTheUserHasLoggedinWith})

@roninopf roninopf self-requested a review November 23, 2021 23:08
@roninopf
Copy link
Contributor

Hi @griffithcaleb, thanks for the PR! Sorry for delays on reviewing and merging, it'll be on our list after the holiday break.

@jena-chakour jena-chakour requested review from evantk91 and removed request for roninopf March 27, 2024 20:23
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.

None yet

2 participants