-
Notifications
You must be signed in to change notification settings - Fork 263
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
External user id not being sent fix #903
Conversation
@@ -148,6 +148,13 @@ - (void)registerUserWithState:(OSUserState *)registrationState withSuccess:(OSMu | |||
//update push player id | |||
if (results.count > 0 && results[OS_PUSH][@"id"]) { | |||
self.currentSubscriptionState.userId = results[OS_PUSH][@"id"]; | |||
|
|||
// Player record was deleted so we should reset external user id | |||
let cachedPlayerId = [OneSignalUserDefaults.initStandard getSavedStringForKey:OSUD_PLAYER_ID_TO defaultValue: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.
When the player is deleted from the server on Android, we clean userId and all cached data for that player. Finally, re-trigger the player's creation. Maybe we want the same behavior here?
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.
We probably do, but I would like to release this fix quickly so I don't want to increase the scope too much. We are already clearing the external user id and player id (by setting it to the new value). Why do we need to re-trigger player creation?
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.
Reviewed 1 of 1 files at r1, 1 of 1 files at r2.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Jeasmine)
This PR fixes two scenarios where we were not sending the external user id when we should be.
This change is