mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-08-08 13:28:43 +03:00
fix(desktop): log notification delivery failures
This commit is contained in:
@@ -115,6 +115,9 @@ function showDesktopNotification(
|
|||||||
body: notificationBody(frame.text),
|
body: notificationBody(frame.text),
|
||||||
subtitle: "nanobot",
|
subtitle: "nanobot",
|
||||||
});
|
});
|
||||||
|
notification.on("failed", (_event, error) => {
|
||||||
|
console.warn(`[nanobot] Desktop notification failed: ${error}`);
|
||||||
|
});
|
||||||
notification.on("click", () => openChatFromNotification(frame.chat_id, options));
|
notification.on("click", () => openChatFromNotification(frame.chat_id, options));
|
||||||
notification.show();
|
notification.show();
|
||||||
unreadNotificationCount += 1;
|
unreadNotificationCount += 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user