hubot-web-push-notifications
Advanced tools
Comparing version 1.1.0 to 1.2.0
13
index.js
@@ -41,3 +41,10 @@ const util = require('util'); | ||
subscriptions = robot.brain.get('web-push-subscriptions'); | ||
robot.logger.debug('Web push subscriptions : ' + util.inspect(subscriptions)); | ||
if (! subscriptions) { | ||
robot.brain.set('web-push-subscriptions', []); | ||
subscriptions = robot.brain.get('web-push-subscriptions'); | ||
robot.logger.info('Web push subscriptions initialized: ' + util.inspect(subscriptions)); | ||
} else { | ||
robot.logger.info('Web push subscriptions: ' + util.inspect(subscriptions)); | ||
} | ||
}); | ||
@@ -66,3 +73,3 @@ | ||
subscriptions.push(sub); | ||
robot.logger.debug('Subscription registered ' + subscription.endpoint); | ||
robot.logger.info('Subscription registered ' + subscription.endpoint); | ||
} | ||
@@ -76,3 +83,3 @@ | ||
subscriptions.splice(subIndex, 1) | ||
robot.logger.debug('Subscription unregistered ' + endpoint); | ||
robot.logger.info('Subscription unregistered ' + endpoint); | ||
}; | ||
@@ -79,0 +86,0 @@ } |
{ | ||
"name": "hubot-web-push-notifications", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Allow users to subscribe to Web Push notifications, notifying them of mentions while away", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13883
274