@@ -92,15 +92,15 @@ export class SubscriptionOperationExecutor implements IOperationExecutor {
9292 const lastUpdateOperation = [ ...operations ]
9393 . reverse ( )
9494 . find ( ( op ) => op instanceof UpdateSubscriptionOperation ) ;
95- const enabled = lastUpdateOperation ?. enabled ?? createOperation . enabled ;
96- const token = lastUpdateOperation ?. token ?? createOperation . token ;
95+ const enabled = lastUpdateOperation ?. _enabled ?? createOperation . _enabled ;
96+ const token = lastUpdateOperation ?. _token ?? createOperation . _token ;
9797 const notification_types =
98- lastUpdateOperation ?. notification_types ??
99- createOperation . notification_types ;
98+ lastUpdateOperation ?. _notification_types ??
99+ createOperation . _notification_types ;
100100
101101 const subscription = {
102- sdk : createOperation . sdk ,
103- type : createOperation . type ,
102+ sdk : createOperation . _sdk ,
103+ type : createOperation . _type ,
104104 enabled,
105105 token,
106106 notification_types,
@@ -209,12 +209,12 @@ export class SubscriptionOperationExecutor implements IOperationExecutor {
209209 ] as UpdateSubscriptionOperation ;
210210
211211 const subscription = {
212- type : lastOp . type ,
213- enabled : lastOp . enabled ,
214- token : lastOp . token ,
215- notification_types : lastOp . notification_types ,
216- web_auth : lastOp . web_auth ,
217- web_p256 : lastOp . web_p256 ,
212+ type : lastOp . _type ,
213+ enabled : lastOp . _enabled ,
214+ token : lastOp . _token ,
215+ notification_types : lastOp . _notification_types ,
216+ web_auth : lastOp . _web_auth ,
217+ web_p256 : lastOp . _web_p256 ,
218218 } ;
219219
220220 const response = await updateSubscriptionById (
@@ -254,12 +254,12 @@ export class SubscriptionOperationExecutor implements IOperationExecutor {
254254 _operations : [
255255 new CreateSubscriptionOperation ( {
256256 appId : lastOp . _appId ,
257- enabled : lastOp . enabled ,
258- notification_types : lastOp . notification_types ,
257+ enabled : lastOp . _enabled ,
258+ notification_types : lastOp . _notification_types ,
259259 onesignalId : lastOp . _onesignalId ,
260260 subscriptionId : lastOp . _subscriptionId ,
261- token : lastOp . token ,
262- type : lastOp . type ,
261+ token : lastOp . _token ,
262+ type : lastOp . _type ,
263263 } ) ,
264264 ] ,
265265 } ;
0 commit comments