Skip to content

Commit 504eace

Browse files
committed
need to fetch user after successfully identifying user
* The anonymous user has been identified, but we still need to Fetch User as we cleared local data * This will hydrate the onesignal_id again as well as other user properties
1 parent c80efe8 commit 504eace

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSUserRequests.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,9 @@ class OSUserExecutor {
216216

217217
static func executeIdentifyUserRequest(_ request: OSRequestIdentifyUser) {
218218
OneSignalClient.shared().execute(request) { _ in
219-
// the anonymous user has been identified, no further action needed, no need to fetch user
220-
executePendingRequests()
219+
// the anonymous user has been identified, still need to Fetch User as we cleared local data
220+
fetchUser(aliasLabel: OS_EXTERNAL_ID, aliasId: request.aliasId, identityModel: request.identityModelToUpdate)
221+
executePendingRequests() // TODO: Here or before fetch?
221222
} onFailure: { error in
222223
// Returns 409 if any provided (label, id) pair exists on another User, so the SDK will switch to this user.
223224
if error?._code == 409 {

0 commit comments

Comments
 (0)