Skip to content

Commit ba938da

Browse files
committed
Propagate externalId to executor result operations in OperationRepo
Follow-up operations returned by executors (e.g. RefreshUserOperation) were inserted directly into the queue without externalId, causing them to be permanently blocked when identity verification is enabled. Made-with: Cursor
1 parent dd288a4 commit ba938da

File tree

1 file changed

+4
-0
lines changed
  • OneSignalSDK/onesignal/core/src/main/java/com/onesignal/core/internal/operations/impl

1 file changed

+4
-0
lines changed

OneSignalSDK/onesignal/core/src/main/java/com/onesignal/core/internal/operations/impl/OperationRepo.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,13 @@ internal class OperationRepo(
340340
// if there are operations provided on the result, we need to enqueue them at the
341341
// beginning of the queue.
342342
if (response.operations != null) {
343+
val parentExternalId = startingOp.operation.externalId
343344
synchronized(queue) {
344345
for (op in response.operations.reversed()) {
345346
op.id = UUID.randomUUID().toString()
347+
if (op.externalId == null && parentExternalId != null) {
348+
op.externalId = parentExternalId
349+
}
346350
val queueItem = OperationQueueItem(op, bucket = 0)
347351
queue.add(0, queueItem)
348352
_operationModelStore.add(0, queueItem.operation)

0 commit comments

Comments
 (0)