From 65cdeaa9de320daad79c20a7ff89cc3a75764c80 Mon Sep 17 00:00:00 2001 From: Valentino Stillhart <4715129+Fusseldieb@users.noreply.github.com> Date: Fri, 18 Apr 2025 05:04:59 -0300 Subject: [PATCH 1/3] Dashes were breaking notifications --- src/electron-main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/electron-main.ts b/src/electron-main.ts index ab38f9c..e210746 100644 --- a/src/electron-main.ts +++ b/src/electron-main.ts @@ -600,4 +600,4 @@ app.on("second-instance", (ev, commandLine, workingDirectory) => { // installer uses for the shortcut icon. // This makes notifications work on windows 8.1 (and is // a noop on other platforms). -app.setAppUserModelId("com.squirrel.element-desktop.Element"); +app.setAppUserModelId("com.squirrel.element.desktop"); From 41ff61421d95925691815d409387a026a0aa73a4 Mon Sep 17 00:00:00 2001 From: Valentino Stillhart <4715129+Fusseldieb@users.noreply.github.com> Date: Fri, 18 Apr 2025 05:19:41 -0300 Subject: [PATCH 2/3] AppIDs must match config to properly display notification icon and title --- src/electron-main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/electron-main.ts b/src/electron-main.ts index e210746..1b4850c 100644 --- a/src/electron-main.ts +++ b/src/electron-main.ts @@ -600,4 +600,4 @@ app.on("second-instance", (ev, commandLine, workingDirectory) => { // installer uses for the shortcut icon. // This makes notifications work on windows 8.1 (and is // a noop on other platforms). -app.setAppUserModelId("com.squirrel.element.desktop"); +app.setAppUserModelId("im.riot.app"); From 37bc884d7771d81088dff288047006cbb0d39821 Mon Sep 17 00:00:00 2001 From: Valentino Stillhart <4715129+Fusseldieb@users.noreply.github.com> Date: Tue, 22 Apr 2025 12:59:39 -0300 Subject: [PATCH 3/3] Explanation for setAppUserModelId --- src/electron-main.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/electron-main.ts b/src/electron-main.ts index 1b4850c..fddee60 100644 --- a/src/electron-main.ts +++ b/src/electron-main.ts @@ -596,8 +596,9 @@ app.on("second-instance", (ev, commandLine, workingDirectory) => { } }); -// Set the App User Model ID to match what the squirrel -// installer uses for the shortcut icon. -// This makes notifications work on windows 8.1 (and is -// a noop on other platforms). +// This is required to make notification handlers work +// on Windows 8.1/10/11 (and is a noop on other platforms); +// It must also match the ID found in 'electron-builder' +// in order to get the title and icon to show up correctly. +// Ref: https://stackoverflow.com/a/77314604/3525780 app.setAppUserModelId("im.riot.app");