@@ -124,6 +124,7 @@ class AzureNotificationHubIOS {
124
124
_alert : string | Object ;
125
125
_sound : string ;
126
126
_badgeCount : number ;
127
+ _category : string ;
127
128
128
129
/**
129
130
* Schedules the localNotification for immediate presentation.
@@ -216,7 +217,7 @@ class AzureNotificationHubIOS {
216
217
*/
217
218
static addEventListener ( type : PushNotificationEventName , handler : Function ) {
218
219
invariant (
219
- type === 'notification' || type === 'register' || type === 'registrationError' ||
220
+ type === 'notification' || type === 'register' || type === 'registrationError' ||
220
221
type === 'registerAzureNotificationHub' || type === 'azureNotificationHubRegistrationError' || type === 'localNotification' ,
221
222
'AzureNotificationHubIOS only supports `notification`, `register`, `registrationError`, `registerAzureNotificationHub`, `azureNotificationHubRegistrationError` and `localNotification` events'
222
223
) ;
@@ -273,7 +274,7 @@ class AzureNotificationHubIOS {
273
274
*/
274
275
static removeEventListener ( type : PushNotificationEventName , handler : Function ) {
275
276
invariant (
276
- type === 'notification' || type === 'register' || type === 'registrationError' ||
277
+ type === 'notification' || type === 'register' || type === 'registrationError' ||
277
278
type === 'registerAzureNotificationHub' || type === 'azureNotificationHubRegistrationError' || type === 'localNotification' ,
278
279
'AzureNotificationHubIOS only supports `notification`, `register`, `registrationError`, `registerAzureNotificationHub`, `azureNotificationHubRegistrationError` and `localNotification` events'
279
280
) ;
@@ -400,6 +401,7 @@ class AzureNotificationHubIOS {
400
401
this . _alert = notifVal . alert ;
401
402
this . _sound = notifVal . sound ;
402
403
this . _badgeCount = notifVal . badge ;
404
+ this . _category = notifVal . category ;
403
405
} else {
404
406
this . _data [ notifKey ] = notifVal ;
405
407
}
@@ -442,6 +444,13 @@ class AzureNotificationHubIOS {
442
444
return this . _badgeCount ;
443
445
}
444
446
447
+ /**
448
+ * Gets the category from the `aps` object
449
+ */
450
+ getCategory ( ) : ?string {
451
+ return this . _category ;
452
+ }
453
+
445
454
/**
446
455
* Gets the data object on the notif
447
456
*/
0 commit comments