summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTobias Järvelöv <tobias.jarvelov@mullvad.net>2025-05-20 11:35:14 +0200
committerSebastian Holmin <sebastian.holmin@mullvad.net>2025-05-28 13:25:41 +0200
commite797c298439ba8ef1ba907fc81ae06a4790b4a44 (patch)
tree8795de840edb13ece447e068fbad70b26a6cd52d
parent2156ac3fb4d69c3d16f988b22f02914b8975ce87 (diff)
downloadmullvadvpn-e797c298439ba8ef1ba907fc81ae06a4790b4a44.tar.xz
mullvadvpn-e797c298439ba8ef1ba907fc81ae06a4790b4a44.zip
Update notification controller to expect 'navigate-external' actions
For system notifications all notifications should now use the 'navigate-external' type instead of 'open-url'.
-rw-r--r--desktop/packages/mullvad-vpn/src/main/notification-controller.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/desktop/packages/mullvad-vpn/src/main/notification-controller.ts b/desktop/packages/mullvad-vpn/src/main/notification-controller.ts
index e0a53cedae..1a04c99140 100644
--- a/desktop/packages/mullvad-vpn/src/main/notification-controller.ts
+++ b/desktop/packages/mullvad-vpn/src/main/notification-controller.ts
@@ -237,7 +237,7 @@ export default class NotificationController {
// Action buttons are only available on macOS.
if (process.platform === 'darwin') {
if (systemNotification.action) {
- notification.actions = [{ type: 'button', text: systemNotification.action.text }];
+ notification.actions = [{ type: 'button', text: systemNotification.action.link.text }];
notification.on('action', () => this.performAction(systemNotification.action));
}
notification.on('click', () => this.notificationControllerDelegate.openApp());
@@ -269,8 +269,8 @@ export default class NotificationController {
}
private performAction(action?: SystemNotificationAction) {
- if (action && action.type === 'open-url') {
- void this.notificationControllerDelegate.openLink(action.url, action.withAuth);
+ if (action && action.type === 'navigate-external') {
+ void this.notificationControllerDelegate.openLink(action.link.to, action.link.withAuth);
}
}