fix: update notification icon handling to use default avatar if unavailable
This commit is contained in:
@@ -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,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user