fix(desktop): log notification delivery failures

This commit is contained in:
Xubin Ren
2026-06-06 16:35:35 +08:00
parent eb20cf9141
commit bc8a6547f5
+3
View File
@@ -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;