Commit 5433ebb
committed
Remove duplicate Create User requests
* If multiple create user requests are enqueued for the same external ID, only keep the most recent one, and remove the previous.
* These requests should all have the same identity model since they share external IDs, so only keeping the latest is adequate.
* This prevents multiple Create User requests with the same external ID from being executed simultaneously, which is possible when JWT is on, as we allow future logins to be sent before past user's login succeeds.
* An example of this is login(a) > login(b) > login(a) > login(b) but user A has an expired token. Once the token is updated for userA, potentially both logins could be executed if we don't prevent duplicates.1 parent a2420ee commit 5433ebb
File tree
1 file changed
+22
-3
lines changed- iOS_SDK/OneSignalSDK/OneSignalUser/Source/Executors
1 file changed
+22
-3
lines changedLines changed: 22 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
184 | 204 | | |
185 | 205 | | |
186 | 206 | | |
| |||
286 | 306 | | |
287 | 307 | | |
288 | 308 | | |
289 | | - | |
290 | | - | |
| 309 | + | |
291 | 310 | | |
292 | 311 | | |
293 | 312 | | |
| |||
296 | 315 | | |
297 | 316 | | |
298 | 317 | | |
299 | | - | |
| 318 | + | |
300 | 319 | | |
301 | 320 | | |
302 | 321 | | |
| |||
0 commit comments