File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
iOS_SDK/OneSignalSDK/OneSignalUser/Source Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -167,13 +167,14 @@ class OSUserExecutor {
167167 return
168168 }
169169 OneSignalClient . shared ( ) . execute ( request) { response in
170- // TODO: Differentiate if we need to fetch based on response code 200, 201, 202
171- // Create User's response won't send us the user's complete info if this user already existed.
172- // We can parse the response OR fetch user (and then parse response then)
173- // For now, do both, as we should parse to get the subscription_id from this request
170+ // TODO: Differentiate if we need to fetch the user based on response code of 200, 201, 202
171+ // Create User's response won't send us the user's complete info if this user already exists
174172 if let response = response {
173+ // Parse the response for any data we need to update
175174 parseFetchUserResponse ( response: response, identityModel: request. identityModel, originalPushToken: originalPushToken)
176- // If we logged into an external_id, fetch the user data
175+
176+ // If this user already exists and we logged into an external_id, fetch the user data
177+ // TODO: Only do this if response code is 200 or 202
177178 if let identity = request. parameters ? [ " identity " ] as? [ String : String ] ,
178179 let externalId = identity [ OS_EXTERNAL_ID] {
179180 fetchUser ( aliasLabel: OS_EXTERNAL_ID, aliasId: externalId, identityModel: request. identityModel)
You can’t perform that action at this time.
0 commit comments