Commit ff61744
committed
fix bug: need to update identity model even when user changed
* Noticed a bug if someone calls `login` right away upon SDK init.
* The initial anonymous create user request is sent, then the model in the stores are replaced with new models when the `login` is called (which will result in an Identify User request). This request is waiting on the onesignal_id of the previous user in order to be sent.
* However, when the first create user request returns, we see that the user has changed, so we weren't hydrating anything.
* As a result, the identify user request could never be sent.
* Instead, always hydrate the identity model in the request first. Then we can hydrate the models in the stores, if the user is the same.1 parent 8650820 commit ff61744
File tree
1 file changed
+7
-0
lines changed- iOS_SDK/OneSignalSDK/OneSignalUser/Source
1 file changed
+7
-0
lines changedLines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
69 | 76 | | |
70 | 77 | | |
71 | 78 | | |
| |||
0 commit comments