Skip to content

Commit 4871e2f

Browse files
author
QuickSander
committed
fix: remove deprecated API call to notification server
1 parent e1d50bd commit 4871e2f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,9 @@ function HttpPushRgb(log, config) {
101101
api.on('didFinishLaunching', function() {
102102
// Check if notificationRegistration is set and user specified notificationID.
103103
// if not 'notificationRegistration' is probably not installed on the system.
104-
if (api.notificationRegistration && typeof api.notificationRegistration === "function" &&
104+
if (global.notificationRegistration && typeof global.notificationRegistration === "function" &&
105105
config.switch.notificationID) {
106106
try {
107-
api.notificationRegistration(config.switch.notificationID, this.handleNotification.bind(this), config.switch.notificationPassword);
108107
global.notificationRegistration(config.switch.notificationID, this.handleNotification.bind(this), config.switch.notificationPassword);
109108

110109
} catch (error) {

0 commit comments

Comments
 (0)