Skip to content

Commit

Permalink
Add check for subscriptionId
Browse files Browse the repository at this point in the history
Change canStartExecute in UpdateSubscriptionOperation and DeleteSubscriptionOperation to match TransferSubscriptionOperation
  • Loading branch information
shepherd-l committed Nov 26, 2024
1 parent 3b7e5d6 commit 9831006
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class DeleteSubscriptionOperation() : Operation(SubscriptionOperationExecutor.DE
override val createComparisonKey: String get() = "$appId.User.$onesignalId"
override val modifyComparisonKey: String get() = "$appId.User.$onesignalId.Subscription.$subscriptionId"
override val groupComparisonType: GroupComparisonType = GroupComparisonType.NONE
override val canStartExecute: Boolean get() = !IDManager.isLocalId(onesignalId) && !IDManager.isLocalId(onesignalId)
override val canStartExecute: Boolean get() = !IDManager.isLocalId(onesignalId) && !IDManager.isLocalId(subscriptionId)
override val applyToRecordId: String get() = subscriptionId

constructor(appId: String, onesignalId: String, subscriptionId: String) : this() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class UpdateSubscriptionOperation() : Operation(SubscriptionOperationExecutor.UP
override val createComparisonKey: String get() = "$appId.User.$onesignalId"
override val modifyComparisonKey: String get() = "$appId.User.$onesignalId.Subscription.$subscriptionId"
override val groupComparisonType: GroupComparisonType = GroupComparisonType.ALTER
override val canStartExecute: Boolean get() = !IDManager.isLocalId(onesignalId) && !IDManager.isLocalId(onesignalId)
override val canStartExecute: Boolean get() = !IDManager.isLocalId(onesignalId) && !IDManager.isLocalId(subscriptionId)
override val applyToRecordId: String get() = subscriptionId

constructor(appId: String, onesignalId: String, subscriptionId: String, type: SubscriptionType, enabled: Boolean, address: String, status: SubscriptionStatus) : this() {
Expand Down

0 comments on commit 9831006

Please sign in to comment.