Skip to content

Commit 3a1f41a

Browse files
authored
Merge pull request #836 from Iterable/evan/MOB-10098
[MOB-10098] Update user modification
2 parents 27c9d19 + 59b1603 commit 3a1f41a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

iterableapi/src/main/java/com/iterable/iterableapi/AnonymousUserManager.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ private void createAnonymousUser(String criteriaId) {
207207
try {
208208
if (!userData.isEmpty()) {
209209
JSONObject updateUserObj = getUserUpdateObjFromLocalStorage();
210+
JSONObject updateUserDataFields = updateUserObj.getJSONObject(IterableConstants.KEY_DATA_FIELDS);
210211

211212
JSONObject userSessionDataJson = new JSONObject(userData);
212213
JSONObject userDataJson = userSessionDataJson.getJSONObject(IterableConstants.SHARED_PREFS_ANON_SESSIONS);
@@ -218,7 +219,7 @@ private void createAnonymousUser(String criteriaId) {
218219
userDataJson.put(IterableConstants.SHARED_PREFS_CRITERIA_ID, Integer.valueOf(criteriaId));
219220

220221
//track anon session with new user
221-
iterableApi.apiClient.trackAnonSession(getCurrentTime(), userId, userDataJson, updateUserObj, data -> {
222+
iterableApi.apiClient.trackAnonSession(getCurrentTime(), userId, userDataJson, updateUserDataFields, data -> {
222223
// success handler
223224
if (IterableApi.getInstance().config.iterableAnonUserHandler != null) {
224225
IterableApi.getInstance().config.iterableAnonUserHandler.onAnonUserCreated(userId);

0 commit comments

Comments
 (0)