fix: update notification icon handling to use default avatar if unavailable

This commit is contained in:
2026-02-27 22:56:40 +11:00
parent b400c4d6c3
commit c890cce37a

View File

@@ -243,9 +243,10 @@ function MessageNotifications() {
// Use renderer window.Notification — works in both Electron and browser. // Use renderer window.Notification — works in both Electron and browser.
// Main-process Notification click events are unreliable on Windows without // Main-process Notification click events are unreliable on Windows without
// full COM/AUMID registration, so we keep everything in the renderer. // full COM/AUMID registration, so we keep everything in the renderer.
const iconUrl = roomAvatar ?? '/res/android/android-chrome-192x192.png';
const noti = new window.Notification(notificationTitle, { const noti = new window.Notification(notificationTitle, {
icon: roomAvatar, icon: iconUrl,
badge: roomAvatar,
body: notificationBody, body: notificationBody,
silent: true, silent: true,
}); });