Commit 2d9f1f3
Preserve existingOnesignalId when deduping LoginUserOperation
When dedupe fires, the existing queued op came from
RecoverFromDroppedLoginBug (always has existingOnesignalId=null) and
the incoming op from enqueueLogin may carry the anonymous user's
UUID needed to merge their tags/subscriptions into the newly-
identified user. Previously the dedupe kept whichever op was first,
silently dropping the merge info when the recovery op won the race.
Merge the incoming op's existingOnesignalId into the queued op in
place before dropping the duplicate. LoginUserOperation.existingOnesignalId
setter relaxed from private to internal to allow the in-place update.
Also initialize the LoginUserOperations in the loadSavedOperations
test properly — the old dedupe only compared ids so uninitialized
ops worked incidentally; the new dedupe reads onesignalId.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 7570a43 commit 2d9f1f3
3 files changed
Lines changed: 24 additions & 20 deletions
File tree
- OneSignalSDK/onesignal/core/src
- main/java/com/onesignal
- core/internal/operations/impl
- user/internal/operations
- test/java/com/onesignal/core/internal/operations
Lines changed: 21 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
174 | 168 | | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
181 | 187 | | |
182 | | - | |
183 | | - | |
184 | 188 | | |
185 | 189 | | |
186 | 190 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
104 | | - | |
| 103 | + | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| |||
0 commit comments