Skip to content

Commit fb77f5e

Browse files
committed
Mark TransferSubscriptionOperation as deprecated
* The transfer subscription operation only contains the subscription ID. It is possible for a push subscription to have been deleted on the server. In this case, only using transfer subscription will lose accurate push subscription data when the server creates a new push subscription. Missing data can include no push token, and inaccurate opted in or permission status. * Instead, we will use Create Subscription instead which will include accurate push subscription data so the server can create a new push subscription accurately.
1 parent 1e691ee commit fb77f5e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

OneSignalSDK/onesignal/core/src/main/java/com/onesignal/user/internal/operations/TransferSubscriptionOperation.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,14 @@ import com.onesignal.core.internal.operations.Operation
66
import com.onesignal.user.internal.operations.impl.executors.SubscriptionOperationExecutor
77

88
/**
9+
* Deprecated as of 5.1.36, the SDK will no longer enqueue this operation. Use Create Subscription instead.
10+
* TransferSubscriptionOperation only contains the ID, but the SDK should include accurate subscription data
11+
* in the case that the push subscription may potentially have been deleted on the server.
12+
* This class remains due to potentially cached operations.
13+
* -------
914
* An [Operation] to transfer a subscription to a new owner on the OneSignal backend.
1015
*/
16+
@Deprecated("The SDK will no longer enqueue this operation. Use Create Subscription instead.")
1117
class TransferSubscriptionOperation() : Operation(SubscriptionOperationExecutor.TRANSFER_SUBSCRIPTION) {
1218
/**
1319
* The application ID this subscription will be transferred under.

0 commit comments

Comments
 (0)