From 4cdc2adc30e32dfa90756c40ba6df3bb07a7aeb2 Mon Sep 17 00:00:00 2001 From: Samuel Elliott Date: Mon, 19 Sep 2022 19:13:23 +0100 Subject: [PATCH] Fix importing node-notifier --- src/cli/nso/notify.ts | 3 ++- src/cli/nso/presence.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cli/nso/notify.ts b/src/cli/nso/notify.ts index f18d020..ae031b1 100644 --- a/src/cli/nso/notify.ts +++ b/src/cli/nso/notify.ts @@ -104,7 +104,8 @@ export async function handler(argv: ArgumentsCamelCase) { const i = new ZncNotifications(storage, token, nso, data); - i.notifications = new TerminalNotificationManager(await import('node-notifier')); + const notifier = (await import('node-notifier')).default; + i.notifications = new TerminalNotificationManager(notifier); i.user_notifications = argv.userNotifications; i.friend_notifications = argv.friendNotifications; i.update_interval = argv.updateInterval; diff --git a/src/cli/nso/presence.ts b/src/cli/nso/presence.ts index 274214c..3187c85 100644 --- a/src/cli/nso/presence.ts +++ b/src/cli/nso/presence.ts @@ -191,7 +191,8 @@ export async function handler(argv: ArgumentsCamelCase) { const i = new ZncDiscordPresence(storage, token, nso, data); - i.notifications = new TerminalNotificationManager(await import('node-notifier')); + const notifier = (await import('node-notifier')).default; + i.notifications = new TerminalNotificationManager(notifier); i.user_notifications = argv.userNotifications; i.friend_notifications = argv.friendNotifications; i.update_interval = argv.updateInterval;